@@ -8,7 +8,7 @@ pub fn set(context: &Context, subject: &str, property: &str, value: &str) -> Ato
8
8
Ok ( r) => r,
9
9
Err ( _) => atomic_lib:: Resource :: new ( subject. into ( ) ) ,
10
10
} ;
11
- resource. set_shortname ( & property, & value, & context. store ) ?;
11
+ resource. set_shortname ( property, value, & context. store ) ?;
12
12
resource. save ( & context. store ) ?;
13
13
Ok ( ( ) )
14
14
}
@@ -22,22 +22,22 @@ pub fn edit(context: &Context, subject: &str, prop: &str) -> AtomicResult<()> {
22
22
Err ( _) => atomic_lib:: Resource :: new ( subject. into ( ) ) ,
23
23
} ;
24
24
// If the prop is not found, create it
25
- let current_val = match resource. get_shortname ( & prop, & context. store ) {
25
+ let current_val = match resource. get_shortname ( prop, & context. store ) {
26
26
Ok ( val) => val. to_string ( ) ,
27
27
Err ( _) => "" . to_string ( ) ,
28
28
} ;
29
29
let edited = edit:: edit ( current_val) ?;
30
30
// Remove newline - or else I can's save shortnames or numbers using vim;
31
31
let trimmed = edited. trim_end_matches ( '\n' ) ;
32
- resource. set_shortname ( & prop, trimmed, & context. store ) ?;
32
+ resource. set_shortname ( prop, trimmed, & context. store ) ?;
33
33
resource. save ( & context. store ) ?;
34
34
Ok ( ( ) )
35
35
}
36
36
37
37
/// Apply a Commit using the Remove method - removes a property from a resource
38
38
pub fn remove ( context : & Context , subject : & str , prop : & str ) -> AtomicResult < ( ) > {
39
39
let mut resource = context. store . get_resource ( subject) ?;
40
- resource. remove_propval_shortname ( & prop, & context. store ) ?;
40
+ resource. remove_propval_shortname ( prop, & context. store ) ?;
41
41
resource. save ( & context. store ) ?;
42
42
Ok ( ( ) )
43
43
}
0 commit comments