@@ -78,7 +78,7 @@ impl<'self> FromHex for &'self str {
7878 * fn main () {
7979 * let hello_str = "Hello, World".to_hex();
8080 * printfln!("%s", hello_str);
81- * let bytes = hello_str.from_hex().get ();
81+ * let bytes = hello_str.from_hex().unwrap ();
8282 * printfln!("%?", bytes);
8383 * let result_str = str::from_bytes(bytes);
8484 * printfln!("%s", result_str);
@@ -132,9 +132,9 @@ mod tests {
132132
133133 #[test]
134134 pub fn test_from_hex_okay() {
135- assert_eq!(" 666 f6f626172".from_hex().get (),
135+ assert_eq!(" 666 f6f626172".from_hex().unwrap (),
136136 " foobar".as_bytes().to_owned());
137- assert_eq!(" 666 F6F626172 ".from_hex().get (),
137+ assert_eq!(" 666 F6F626172 ".from_hex().unwrap (),
138138 " foobar".as_bytes().to_owned());
139139 }
140140
@@ -151,7 +151,7 @@ mod tests {
151151
152152 #[test]
153153 pub fn test_from_hex_ignores_whitespace() {
154- assert_eq!(" 666 f 6 f6\r \n 26172 ".from_hex().get (),
154+ assert_eq!(" 666 f 6 f6\r \n 26172 ".from_hex().unwrap (),
155155 " foobar".as_bytes().to_owned());
156156 }
157157
@@ -165,8 +165,8 @@ mod tests {
165165 #[test]
166166 pub fn test_from_hex_all_bytes() {
167167 for i in range(0, 256) {
168- assert_eq!(fmt!(" %02 x", i as uint).from_hex().get (), ~[i as u8]);
169- assert_eq!(fmt!(" %02 X ", i as uint).from_hex().get (), ~[i as u8]);
168+ assert_eq!(fmt!(" %02 x", i as uint).from_hex().unwrap (), ~[i as u8]);
169+ assert_eq!(fmt!(" %02 X ", i as uint).from_hex().unwrap (), ~[i as u8]);
170170 }
171171 }
172172
0 commit comments