aboutsummaryrefslogtreecommitdiff
path: root/src/client/context.rs
diff options
context:
space:
mode:
authorKen Swenson <[email protected]>2018-11-11 09:27:22 -0500
committerKen Swenson <[email protected]>2018-11-11 09:27:22 -0500
commitd58221707ff5dce476b6c2a7caa5e586d2e4e710 (patch)
tree574967fcd3b3e4f7384455619a14d2a3a9a703e1 /src/client/context.rs
parentRevert "Remove Context::edit_profile" (diff)
downloadserenity-d58221707ff5dce476b6c2a7caa5e586d2e4e710.tar.xz
serenity-d58221707ff5dce476b6c2a7caa5e586d2e4e710.zip
Update context and edit_profile doc test
Diffstat (limited to 'src/client/context.rs')
-rw-r--r--src/client/context.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/client/context.rs b/src/client/context.rs
index 6574d53..9ca4f55 100644
--- a/src/client/context.rs
+++ b/src/client/context.rs
@@ -1,12 +1,19 @@
+use builder::EditProfile;
+use CACHE;
use client::bridge::gateway::ShardMessenger;
+use error::Result;
use gateway::InterMessage;
+use http;
use model::prelude::*;
use parking_lot::Mutex;
+use serde_json::Value;
use std::sync::{
- mpsc::Sender,
- Arc
+ Arc,
+ mpsc::Sender
};
use typemap::ShareMap;
+use utils::VecMap;
+use utils::vecmap_to_json_map;
/// The context is a general utility struct provided on event dispatches, which
/// helps with dealing with the current "context" of the event dispatch.
@@ -104,7 +111,7 @@ impl Context {
}
}
- let edited = utils::vecmap_to_json_map(f(EditProfile(map)).0);
+ let edited = vecmap_to_json_map(f(EditProfile(map)).0);
http::edit_profile(&edited)
}