diff options
| author | Simon Sapin <simon.sapin@exyr.org> | 2013-12-23 17:45:01 +0100 |
|---|---|---|
| committer | Simon Sapin <simon.sapin@exyr.org> | 2014-01-21 15:48:48 -0800 |
| commit | 05ae134acebee3f35af4880de113a7ae7ce20002 (patch) | |
| tree | 096daf1c7c42bd04ac3d1f11f710fd9786d9937a /src/librustpkg | |
| parent | b8c41492939c77b7139e46ee67375b47041f6692 (diff) | |
[std::str] Rename from_utf8_owned_opt() to from_utf8_owned(), drop the old from_utf8_owned() behavior
Diffstat (limited to 'src/librustpkg')
| -rw-r--r-- | src/librustpkg/source_control.rs | 16 | ||||
| -rw-r--r-- | src/librustpkg/tests.rs | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/librustpkg/source_control.rs b/src/librustpkg/source_control.rs index 7da99c5d562..4b7aaf7e340 100644 --- a/src/librustpkg/source_control.rs +++ b/src/librustpkg/source_control.rs @@ -38,8 +38,8 @@ pub fn safe_git_clone(source: &Path, v: &Version, target: &Path) -> CloneResult target.as_str().unwrap().to_owned()]); let outp = opt_outp.expect("Failed to exec `git`"); if !outp.status.success() { - println!("{}", str::from_utf8_owned(outp.output.clone())); - println!("{}", str::from_utf8_owned(outp.error)); + println!("{}", str::from_utf8_owned(outp.output.clone()).unwrap()); + println!("{}", str::from_utf8_owned(outp.error).unwrap()); return DirToUse(target.clone()); } else { @@ -54,8 +54,8 @@ pub fn safe_git_clone(source: &Path, v: &Version, target: &Path) -> CloneResult format!("--git-dir={}", git_dir.as_str().unwrap().to_owned()), ~"checkout", format!("{}", *s)]).expect("Failed to exec `git`"); if !outp.status.success() { - println!("{}", str::from_utf8_owned(outp.output.clone())); - println!("{}", str::from_utf8_owned(outp.error)); + println!("{}", str::from_utf8_owned(outp.output.clone()).unwrap()); + println!("{}", str::from_utf8_owned(outp.error).unwrap()); return DirToUse(target.clone()); } } @@ -114,8 +114,8 @@ pub fn git_clone_url(source: &str, target: &Path, v: &Version) { target.as_str().unwrap().to_owned()]); let outp = opt_outp.expect("Failed to exec `git`"); if !outp.status.success() { - debug!("{}", str::from_utf8_owned(outp.output.clone())); - debug!("{}", str::from_utf8_owned(outp.error)); + debug!("{}", str::from_utf8_owned(outp.output.clone()).unwrap()); + debug!("{}", str::from_utf8_owned(outp.error).unwrap()); cond.raise((source.to_owned(), target.clone())) } else { @@ -125,8 +125,8 @@ pub fn git_clone_url(source: &str, target: &Path, v: &Version) { target); let outp = opt_outp.expect("Failed to exec `git`"); if !outp.status.success() { - debug!("{}", str::from_utf8_owned(outp.output.clone())); - debug!("{}", str::from_utf8_owned(outp.error)); + debug!("{}", str::from_utf8_owned(outp.output.clone()).unwrap()); + debug!("{}", str::from_utf8_owned(outp.error).unwrap()); cond.raise((source.to_owned(), target.clone())) } } diff --git a/src/librustpkg/tests.rs b/src/librustpkg/tests.rs index b2cc568ee5e..c0b4a246d35 100644 --- a/src/librustpkg/tests.rs +++ b/src/librustpkg/tests.rs @@ -1191,7 +1191,7 @@ fn test_info() { let expected_info = ~"package foo"; // fill in let workspace = create_local_package(&CrateId::new("foo")); let output = command_line_test([~"info", ~"foo"], workspace.path()); - assert_eq!(str::from_utf8_owned(output.output), expected_info); + assert_eq!(str::from_utf8_owned(output.output).unwrap(), expected_info); } #[test] |
