Skip to content

Commit

Permalink
[core] Tweak Value::shallow_clone
Browse files Browse the repository at this point in the history
- elide lifetime
- fix formatting of doc comments
  • Loading branch information
Enet4 committed Jul 13, 2024
1 parent c757898 commit eae2801
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/value/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ impl<I, P> Value<I, P> {

/// Produce a shallow clone of the value,
/// leaving the items and pixel data fragments as references.
///
///
/// If the value is primitive,
/// the entire value will be copied.
/// Otherwise, the item or fragment sequences
/// will hold references to the original data.
pub fn shallow_clone<'a>(&'a self) -> Value<&'a I, &'a P> {
pub fn shallow_clone(&self) -> Value<&I, &P> {
match self {
Value::Primitive(v) => Value::Primitive(v.clone()),
Value::Sequence(v) => Value::Sequence(DataSetSequence {
Expand Down

0 comments on commit eae2801

Please sign in to comment.