Skip to content

Commit 7443c6c

Browse files
committed
deref Label to &str directly
1 parent 4382423 commit 7443c6c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

parser/src/command/relabel.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ impl Label {
5151
}
5252

5353
impl std::ops::Deref for Label {
54-
type Target = String;
55-
fn deref(&self) -> &String {
56-
&self.0
54+
type Target = str;
55+
fn deref(&self) -> &str {
56+
&self.0.as_str()
5757
}
5858
}
5959

src/handlers/relabel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub(super) async fn handle_command(
2727
let mut results = vec![];
2828
let mut to_add = vec![];
2929
for delta in &input.0 {
30-
let name = delta.label().as_str();
30+
let name: &str = delta.label();
3131
let err = match check_filter(name, config, is_member(event.user(), &ctx.team).await) {
3232
Ok(CheckFilterResult::Allow) => None,
3333
Ok(CheckFilterResult::Deny) => {

0 commit comments

Comments
 (0)