This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <cnchi> | |
| <editions> | |
| <edition name="common" description="Packages common to all DE and base"> | |
| <packages> | |
| <pkgname>acpid</pkgname> | |
| <pkgname>alsa-utils</pkgname> | |
| <pkgname>antergos-keyring</pkgname> | |
| <pkgname>antergos-mirrorlist</pkgname> | |
| <pkgname>antergos-midnight-timers</pkgname> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn mutate_vector(v: &mut Vec<i32>) { | |
| // is this correct? &*v seems dirty but is required | |
| // due to the function header... | |
| for i in &*v { | |
| // do something | |
| } | |
| v.push(32); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn add_to_mutable_reference(x: &mut i32) { | |
| *x +=1; | |
| } | |
| #[test] | |
| fn mutable_reference_test() { | |
| let mut x = 5; | |
| mutable_reference(&mut x); | |
| assert_eq!(6, x); |