Commit 3bbfce09 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

cargo: update crates

parent c5b319f0
......@@ -12,14 +12,14 @@ readme = "README.md"
build = "build.rs"
[build-dependencies]
serde_codegen = "~0.7"
serde_codegen = "~0.8"
[dependencies]
chrono = { version = "~0.2, <=0.2.23", features = ["serde"] }
ease = "~0.5"
chrono = { version = "~0.2", features = ["serde"] }
ease = "~0.6"
hyper = "~0.9"
log = "*"
quick-error = "~1.1"
serde = "~0.7"
serde_json = "~0.7"
url = "~1.1"
serde = "~0.8"
serde_json = "~0.8"
url = "~1.2"
......@@ -49,7 +49,7 @@ impl Error {
/// Extract the message from a Gitlab JSON error.
pub fn from_gitlab(value: Value) -> Self {
let msg = value.pointer("/message")
.and_then(|s| s.as_string())
.and_then(|s| s.as_str())
.unwrap_or_else(|| "unknown error");
Error::Gitlab(msg.to_string())
......
......@@ -373,7 +373,7 @@ impl Gitlab {
// This method exists because we want to store the current user in the structure, but we don't
// have a `self` before we create the structure. Making it `Option<>` is a little silly and
// refactoring this out is worth the cleaner API.
fn _mkrequest1<'a>(base_url: &Url, token: &str, url: &str) -> GitlabResult<Request<'a>> {
fn _mkrequest1(base_url: &Url, token: &str, url: &str) -> GitlabResult<Request> {
let full_url = try!(base_url.join(url));
let mut req = Request::new(full_url);
......
......@@ -1110,7 +1110,7 @@ impl Note {
match self.noteable_type {
NoteType::Commit => {
self.noteable_id
.as_string()
.as_str()
.map(|id| NoteableId::Commit(ObjectId::new(id)))
},
NoteType::Issue => {
......@@ -1249,7 +1249,7 @@ impl Event {
match self.target_type {
EventTargetType::Commit => {
self.target_id
.as_string()
.as_str()
.map(|id| EventTargetId::Commit(ObjectId(id.to_string())))
},
EventTargetType::Issue => {
......
......@@ -227,9 +227,9 @@ impl MergeRequestParams {
self.force_remove_source_branch
.as_ref()
.map(|val| {
if let Some(as_str) = val.as_string() {
if let Some(as_str) = val.as_str() {
as_str == "1"
} else if let Some(as_bool) = val.as_boolean() {
} else if let Some(as_bool) = val.as_bool() {
as_bool
} else {
error!(target: "gitlab",
......@@ -416,7 +416,7 @@ impl NoteHookAttrs {
match self.noteable_type {
NoteHookType::Commit => {
self.noteable_id
.as_string()
.as_str()
.map(|id| NoteableId::Commit(ObjectId::new(id)))
},
NoteHookType::Issue => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment