Commit Graph

18 Commits

Author SHA1 Message Date
iceiix 518b6a07f8
Reformat all source with cargo fmt (#335) 2020-06-21 12:17:24 -07:00
ice_iix 9504be550f Recognize translate text components, instead of showing "UNHANDLED"
For example, if a server connection times out and you are kicked, Steven
will now show disconnect.reason timeout, versus a non-descriptive
UNHANDLED message. This text is supposed to be looked up in a
translation table for localization, not yet supported, but showing the
translation identifier is more informative than nothing.
2018-12-02 19:25:11 -08:00
ice_iix 901e54772e Use field init shorthand, instead of x:x, just x,
https://rust-lang-nursery.github.io/edition-guide/rust-2018/data-types/field-init-shorthand.html

find src -name '*.rs' -exec perl -pe 's/\b(\w+): \1,/$1,/g' -i {} \;
2018-11-04 13:43:30 -08:00
ice_iix 099e10195b Update try!() to new ? syntax for Rust 2018 edition
Not automatically updated, see https://users.rust-lang.org/t/why-does-cargo-fix-replace-try-with-r-try-instead-of/21972/3
There are other tools to replace it, btu this is what I used:
find src -name '*.rs' -exec perl -MRegexp::Common -0777 -pe'$bp=$RE{balanced}{-parens=>"()"}; s/try\!($bp)/substr($1, 1, length($1) - 2) . "?"/ges' -i {} \;
2018-11-04 11:48:51 -08:00
iceiix 7e5bb999e4 Update to serde_json 1.0 (#6)
* Replace find() with get()

* Update for renamed as_string->as_str and as_boolean->as_bool

https://github.com/serde-rs/json/releases/tag/v0.8.0
Value::as_string() has been renamed to as_str() and Value::as_boolean() has been renamed to as_bool() to improve consistency
https://github.com/serde-rs/json/issues/126

* No serde_json::Value::I64/U64/F64 anymore, only Number

* Update from lookup() to pointer(), using JSON pointer syntax

https://github.com/iceiix/steven/pull/6#issuecomment-432472123

* Remove unused and removed ObjectBuilder import

* Use into_iter().collect() to convert BTreeMap to serde_json::Map

* Change parse_rules to accept serde_json::Map instead of BTreeMap

* Remove unused serde_json macro_use

* Update Cargo.lock
2018-10-23 18:47:21 -07:00
llogiq 0f41b0effe Fixed another batch of clippy warnings
Those are mostly readability-related. Also did a cargo update.
2016-09-15 15:15:52 +01:00
Techcable 49b1ae1dbc Update to minecraft 1.10.2 2016-07-10 12:23:59 +01:00
Thinkofname 2589b169ca Follow some of clippy's suggestions 2016-03-26 14:24:26 +00:00
Thinkofdeath 30c7dbeaea Update copyright 2016-03-16 18:25:35 +00:00
Thinkofdeath 35306c62e1 Reformat using rustfmt 2015-10-07 19:36:59 +01:00
Thinkofdeath dc810c15dd Tidy up 2015-09-29 20:09:36 +01:00
Thinkofdeath 12847e9686 Kinda functional server list 2015-09-25 14:00:49 +01:00
Thinkofdeath 1920e9e9e2 Base of server list 2015-09-23 20:16:25 +01:00
Thinkofdeath 906a44d9d4 Add license 2015-09-17 16:23:07 +01:00
Thinkofdeath b9d7063099 Base of ui complete 2015-09-17 16:04:25 +01:00
Thinkofdeath 2d10d38e4c Complete protocol implementation 2015-09-12 20:31:26 +01:00
Thinkofdeath 25a033268c Tabs to spaces 2015-09-10 11:58:42 +01:00
Thinkofdeath fe6a56ce3a Main part of the protocol complete 2015-09-10 11:49:41 +01:00