From ba8139ec6f60b2f12217aee16e355bbc3a7e9ae3 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Wed, 2 Sep 2015 09:02:05 -0400 Subject: [PATCH] Fix nightly warnings related to lifetimes The following warnings appear: ``` src/command.rs:344:5: 344:56 warning: the trait `core::marker::Sized` is not implemented for the type `Self` [E0277] src/command.rs:344 fn from_json(body: &Json) -> WebDriverResult; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/command.rs:344:5: 344:56 help: run `rustc --explain E0277` to see a detailed explanation src/command.rs:344:5: 344:56 note: `Self` does not have a constant size known at compile-time src/command.rs:344 fn from_json(body: &Json) -> WebDriverResult; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/command.rs:344:5: 344:56 note: this warning results from recent bug fixes and clarifications; it will become a HARD ERROR in the next release. See RFC 1214 for details. src/command.rs:344 fn from_json(body: &Json) -> WebDriverResult; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/command.rs:344:5: 344:56 note: required by `core::result::Result` src/command.rs:344 fn from_json(body: &Json) -> WebDriverResult; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` ...because of: https://github.com/rust-lang/rfcs/pull/1214 --- src/command.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command.rs b/src/command.rs index 2251ce1..df4428a 100644 --- a/src/command.rs +++ b/src/command.rs @@ -340,7 +340,7 @@ impl ToJson for WebDriverMessage { } } -trait Parameters { +trait Parameters: Sized { fn from_json(body: &Json) -> WebDriverResult; }