Skip to content

Commit ba8139e

Browse files
committed
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<Self>; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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<Self>; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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<Self>; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/command.rs:344:5: 344:56 note: required by `core::result::Result` src/command.rs:344 fn from_json(body: &Json) -> WebDriverResult<Self>; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` ...because of: rust-lang/rfcs#1214
1 parent 7fd0a2a commit ba8139e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ impl ToJson for WebDriverMessage {
340340
}
341341
}
342342

343-
trait Parameters {
343+
trait Parameters: Sized {
344344
fn from_json(body: &Json) -> WebDriverResult<Self>;
345345
}
346346

0 commit comments

Comments
 (0)