mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -191,3 +191,16 @@ snippet as "assert!"
|
||||
assert!(${1:predicate});
|
||||
snippet ase "assert_eq!"
|
||||
assert_eq!(${1:expected}, ${2:actual});
|
||||
# Implementations
|
||||
snippet asref "AsRef trait implementation"
|
||||
impl AsRef<${1:Ref}> for ${2:Type} {
|
||||
fn as_ref(&self) -> &${3:$1} {
|
||||
&self.${0:field}
|
||||
}
|
||||
}
|
||||
snippet asmut "AsMut trait implementation"
|
||||
impl AsMut<${1:Ref}> for ${2:Type} {
|
||||
fn as_mut(&mut self) -> &mut ${3:$1} {
|
||||
&mut self.${0:field}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user