Skip to content

Commit 3dffcc9

Browse files
committed
kernel_cmdline: Derive Clone for Cmdline
No reason not to, generally useful. Signed-off-by: John Eckersberg <[email protected]>
1 parent 52f49b5 commit 3dffcc9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/kernel_cmdline/src/bytes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use anyhow::Result;
1515
/// Wraps the raw command line bytes and provides methods for parsing and iterating
1616
/// over individual parameters. Uses copy-on-write semantics to avoid unnecessary
1717
/// allocations when working with borrowed data.
18-
#[derive(Debug, Default)]
18+
#[derive(Clone, Debug, Default)]
1919
pub struct Cmdline<'a>(Cow<'a, [u8]>);
2020

2121
impl<'a, T: AsRef<[u8]> + ?Sized> From<&'a T> for Cmdline<'a> {

crates/kernel_cmdline/src/utf8.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use anyhow::Result;
1414
/// Wraps the raw command line bytes and provides methods for parsing and iterating
1515
/// over individual parameters. Uses copy-on-write semantics to avoid unnecessary
1616
/// allocations when working with borrowed data.
17-
#[derive(Debug, Default)]
17+
#[derive(Clone, Debug, Default)]
1818
pub struct Cmdline<'a>(bytes::Cmdline<'a>);
1919

2020
impl<'a, T: AsRef<str> + ?Sized> From<&'a T> for Cmdline<'a> {

0 commit comments

Comments
 (0)