MCPcopy Create free account
hub / github.com/cobalt-org/kstring / clone

Method clone

src/string.rs:469–475  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

467 // `as_str()` that, when combined with a jump table, is blowing the icache, slowing things down.
468 impl<B: Clone> Clone for KStringInner<B> {
469 fn clone(&self) -> Self {
470 match self {
471 Self::Singleton(s) => Self::Singleton(s),
472 Self::Inline(s) => Self::Inline(*s),
473 Self::Owned(s) => Self::Owned(s.clone()),
474 }
475 }
476 }
477
478 #[allow(unused)]

Callers 2

bench_cloneFunction · 0.80
fromMethod · 0.80

Calls 2

tagMethod · 0.80
is_ownedMethod · 0.80

Tested by

no test coverage detected