File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ impl Keyring {
421
421
/// If the kernel returns malformed data, the the parser will panic.
422
422
pub fn description ( & self ) -> Result < Description > {
423
423
self . description_raw ( )
424
- . and_then ( |desc| Description :: parse ( desc) . ok_or ( errno:: Errno ( libc:: EINVAL ) ) )
424
+ . and_then ( |desc| Description :: parse ( & desc) . ok_or ( errno:: Errno ( libc:: EINVAL ) ) )
425
425
}
426
426
427
427
/// Set an expiration timer on the keyring to `timeout`.
@@ -617,7 +617,7 @@ pub struct Description {
617
617
}
618
618
619
619
impl Description {
620
- fn parse ( desc : String ) -> Option < Description > {
620
+ fn parse ( desc : & str ) -> Option < Description > {
621
621
let mut pieces = desc. split ( ';' ) . collect :: < Vec < _ > > ( ) ;
622
622
// Reverse the string because the kernel plans to extend it by adding fields to the
623
623
// beginning of the string. By doing this, the fields are at a constant position in the
You can’t perform that action at this time.
0 commit comments