summaryrefslogtreecommitdiff
path: root/src/ship.rs
diff options
context:
space:
mode:
authortom barrett <spalf0@gmail.com>2018-02-23 05:04:55 -0600
committertom barrett <spalf0@gmail.com>2018-02-23 05:04:55 -0600
commitceb9ee22f32d46a6e49229f447c414f3707eb3ac (patch)
tree888b5b9824655d05b26f11848ca5290a7e032485 /src/ship.rs
parent7798ebba1d8762e8b4c6eaf1efcd610fa030375a (diff)
various ways potentially to deserialize?
Diffstat (limited to 'src/ship.rs')
-rw-r--r--src/ship.rs6
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();
+ }
}