Skip to content

Commit 116c053

Browse files
committed
totally unnecessary template type because its fun
1 parent 0389edc commit 116c053

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cargo/util/rustc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl Rustc {
110110

111111
Ok(Rustc {
112112
path,
113-
wrapper: wrapper.map(|w| RustcWrapper::new(w)),
113+
wrapper: wrapper.map(RustcWrapper::new),
114114
verbose_version,
115115
host,
116116
cache: Mutex::new(cache),
@@ -141,8 +141,8 @@ impl Rustc {
141141
self.cache.lock().unwrap().cached_success(cmd)
142142
}
143143

144-
pub fn push_wrapper(&mut self, wrapper: RustcWrapper) {
145-
self.wrapper = Some(wrapper);
144+
pub fn push_wrapper<T: Into<Option<RustcWrapper>>>(&mut self, wrapper: T) {
145+
self.wrapper = wrapper.into();
146146
}
147147
}
148148

0 commit comments

Comments
 (0)