Fix builds.

This commit is contained in:
Stephen Chung 2021-07-24 14:23:14 +08:00
parent df482d3574
commit 8531567ee9
2 changed files with 2 additions and 1 deletions

View File

@ -153,7 +153,7 @@ impl<'a> From<&'a ScriptFnDef> for ScriptFnMetadata<'a> {
Self { Self {
#[cfg(not(feature = "no_function"))] #[cfg(not(feature = "no_function"))]
#[cfg(feature = "metadata")] #[cfg(feature = "metadata")]
comments: self.comments.iter().map(|s| s.as_str()).collect(), comments: value.comments.iter().map(|s| s.as_str()).collect(),
access: value.access, access: value.access,
name: &value.name, name: &value.name,
params: value.params.iter().map(|s| s.as_str()).collect(), params: value.params.iter().map(|s| s.as_str()).collect(),

View File

@ -212,6 +212,7 @@ pub enum Union {
TimeStamp(Box<Instant>, Tag, AccessMode), TimeStamp(Box<Instant>, Tag, AccessMode),
/// Any type as a trait object. /// Any type as a trait object.
#[allow(clippy::redundant_allocation)]
Variant(Box<Box<dyn Variant>>, Tag, AccessMode), Variant(Box<Box<dyn Variant>>, Tag, AccessMode),
/// A _shared_ value of any type. /// A _shared_ value of any type.