Skip to content

Commit 1e8af44

Browse files
Fix clippy lifetime lint
Also use `Self` to make this function more consistent with the rest of the code.
1 parent 24d88f2 commit 1e8af44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sbat/src/component.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ pub struct Component<'a> {
2525
impl<'a> Component<'a> {
2626
/// Create a `Component`.
2727
#[must_use]
28-
pub fn new(name: &AsciiStr, generation: Generation) -> Component {
29-
Component { name, generation }
28+
pub fn new(name: &'a AsciiStr, generation: Generation) -> Self {
29+
Self { name, generation }
3030
}
3131

3232
/// Parse a `Component` from a `Record`.

0 commit comments

Comments
 (0)