about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/back/archive.rs
diff options
context:
space:
mode:
authorljedrz <ljedrz@gmail.com>2018-10-06 11:42:14 +0200
committerljedrz <ljedrz@gmail.com>2018-11-10 19:22:38 +0100
commitc4c39e9395f10005aa6919d426e18fec43328392 (patch)
tree355db5d2d3cbc2db293fbae336ecdcb55169ddfd /src/librustc_codegen_llvm/back/archive.rs
parent1d1dc48407e9feb5443173aefb3fd0db252e82c7 (diff)
downloadrust-c4c39e9395f10005aa6919d426e18fec43328392.tar.gz
rust-c4c39e9395f10005aa6919d426e18fec43328392.zip
codegen_llvm_back: use Cow<'static, str> where applicable
Diffstat (limited to 'src/librustc_codegen_llvm/back/archive.rs')
-rw-r--r--src/librustc_codegen_llvm/back/archive.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/back/archive.rs b/src/librustc_codegen_llvm/back/archive.rs
index 077c8c31f4a..a69d5b7fd9b 100644
--- a/src/librustc_codegen_llvm/back/archive.rs
+++ b/src/librustc_codegen_llvm/back/archive.rs
@@ -282,10 +282,9 @@ impl<'a> ArchiveBuilder<'a> {
             let ret = if r.into_result().is_err() {
                 let err = llvm::LLVMRustGetLastError();
                 let msg = if err.is_null() {
-                    "failed to write archive".to_string()
+                    "failed to write archive".into()
                 } else {
                     String::from_utf8_lossy(CStr::from_ptr(err).to_bytes())
-                            .into_owned()
                 };
                 Err(io::Error::new(io::ErrorKind::Other, msg))
             } else {