]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_errors/src/translation.rs
Auto merge of #101250 - klensy:bump-deps-08-22, r=Dylan-DPC
[rust.git] / compiler / rustc_errors / src / translation.rs
index 65338f56d9ccb5ea545c607095c61966e8191f4e..4f407badb3f9eb777e3857ac835dccc9cdab1993 100644 (file)
@@ -21,7 +21,7 @@ pub trait Translate {
     /// Typically performed once for each diagnostic at the start of `emit_diagnostic` and then
     /// passed around as a reference thereafter.
     fn to_fluent_args<'arg>(&self, args: &[DiagnosticArg<'arg>]) -> FluentArgs<'arg> {
-        FromIterator::from_iter(args.to_vec().drain(..))
+        FromIterator::from_iter(args.iter().cloned())
     }
 
     /// Convert `DiagnosticMessage`s to a string, performing translation if necessary.