We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0389edc commit 116c053Copy full SHA for 116c053
src/cargo/util/rustc.rs
@@ -110,7 +110,7 @@ impl Rustc {
110
111
Ok(Rustc {
112
path,
113
- wrapper: wrapper.map(|w| RustcWrapper::new(w)),
+ wrapper: wrapper.map(RustcWrapper::new),
114
verbose_version,
115
host,
116
cache: Mutex::new(cache),
@@ -141,8 +141,8 @@ impl Rustc {
141
self.cache.lock().unwrap().cached_success(cmd)
142
}
143
144
- pub fn push_wrapper(&mut self, wrapper: RustcWrapper) {
145
- self.wrapper = Some(wrapper);
+ pub fn push_wrapper<T: Into<Option<RustcWrapper>>>(&mut self, wrapper: T) {
+ self.wrapper = wrapper.into();
146
147
148
0 commit comments