diff options
author | tom barrett <spalf0@gmail.com> | 2018-02-23 05:04:55 -0600 |
---|---|---|
committer | tom barrett <spalf0@gmail.com> | 2018-02-23 05:04:55 -0600 |
commit | ceb9ee22f32d46a6e49229f447c414f3707eb3ac (patch) | |
tree | 888b5b9824655d05b26f11848ca5290a7e032485 /src/ship.rs | |
parent | 7798ebba1d8762e8b4c6eaf1efcd610fa030375a (diff) |
various ways potentially to deserialize?
Diffstat (limited to 'src/ship.rs')
-rw-r--r-- | src/ship.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ship.rs b/src/ship.rs index 30a27fb..49da84d 100644 --- a/src/ship.rs +++ b/src/ship.rs @@ -19,7 +19,7 @@ impl Mass for Ship { Ship { name : String::from(name), location : location, - r : 10.0, + r : 100.0, } } @@ -38,4 +38,8 @@ impl Mass for Ship { fn serialize(&self) ->String { serde_json::to_string(self).unwrap() } + + fn deserialize(&mut self, data : &str) { + //self = serde_json::from_str(data).unwrap(); + } } |