Use SmartString for comments.
This commit is contained in:
parent
dbac4d5689
commit
8685323b15
@ -34,7 +34,7 @@ pub struct ScriptFnDef {
|
|||||||
///
|
///
|
||||||
/// Each line in non-block doc-comments starts with `///`.
|
/// Each line in non-block doc-comments starts with `///`.
|
||||||
#[cfg(feature = "metadata")]
|
#[cfg(feature = "metadata")]
|
||||||
pub comments: Box<[crate::Identifier]>,
|
pub comments: Box<[crate::SmartString]>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for ScriptFnDef {
|
impl fmt::Display for ScriptFnDef {
|
||||||
|
@ -27,7 +27,7 @@ impl Hasher for StraightHasher {
|
|||||||
fn finish(&self) -> u64 {
|
fn finish(&self) -> u64 {
|
||||||
self.0
|
self.0
|
||||||
}
|
}
|
||||||
#[inline(always)]
|
#[cold]
|
||||||
fn write(&mut self, _bytes: &[u8]) {
|
fn write(&mut self, _bytes: &[u8]) {
|
||||||
panic!("StraightHasher can only hash u64 values");
|
panic!("StraightHasher can only hash u64 values");
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ pub struct FuncInfoMetadata {
|
|||||||
pub return_type: Identifier,
|
pub return_type: Identifier,
|
||||||
/// Comments.
|
/// Comments.
|
||||||
#[cfg(feature = "metadata")]
|
#[cfg(feature = "metadata")]
|
||||||
pub comments: Box<[Identifier]>,
|
pub comments: Box<[SmartString]>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A type containing a single registered function.
|
/// A type containing a single registered function.
|
||||||
|
Loading…
Reference in New Issue
Block a user