aboutsummaryrefslogtreecommitdiff
path: root/src/client/cli/cmd/write.rs
diff options
context:
space:
mode:
authorArne Dußin2021-02-03 10:51:08 +0100
committerArne Dußin2021-02-03 10:51:08 +0100
commitd4c1c7ecb5688ef64f45425d9ac8e7ddeb8e8602 (patch)
tree6788d2efc22373d735947ba46d3a3ea3b3b3733c /src/client/cli/cmd/write.rs
parentf92e9f6f07b1e3834c2ca58ce3510734819d08e4 (diff)
downloadgraf_karto-d4c1c7ecb5688ef64f45425d9ac8e7ddeb8e8602.tar.gz
graf_karto-d4c1c7ecb5688ef64f45425d9ac8e7ddeb8e8602.zip
Fix commands
Commands now operate on the local file system, but on the remote world
Diffstat (limited to 'src/client/cli/cmd/write.rs')
-rw-r--r--src/client/cli/cmd/write.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/cli/cmd/write.rs b/src/client/cli/cmd/write.rs
index 3114f63..37d5a0a 100644
--- a/src/client/cli/cmd/write.rs
+++ b/src/client/cli/cmd/write.rs
@@ -25,9 +25,9 @@ impl FromArgs for Write {
impl Command for Write {
fn process(&self, editor: &mut Editor) -> Result<String, String> {
- let data = MapData::extract_data(editor.map());
+ let world = editor.map().clone_as_world();
- match data.write_to_file(&self.destination) {
+ match world.write_to_file(&self.destination) {
Ok(_) => Ok(format!(
"Successfully wrote contents to `{:?}`",
&self.destination