From 0509d42a088539da441c7ce62f3fe7ac6c66fa68 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 20 Feb 2024 10:10:19 +0000 Subject: fix: cover letter description from patch if description isn't present this was causing an breaking error --- src/sub_commands/send.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/sub_commands') diff --git a/src/sub_commands/send.rs b/src/sub_commands/send.rs index 403f1fd..1633cb8 100644 --- a/src/sub_commands/send.rs +++ b/src/sub_commands/send.rs @@ -488,8 +488,7 @@ pub fn event_to_cover_letter(event: &nostr::Event) -> Result { let description_index_end = event.content[title_index..] .find("\ndiff --git") - .unwrap_or(event.content.len() - 1) - + title_index; + .unwrap_or(event.content.len() - 1); let title = if let Ok(msg) = tag_value(event, "description") { msg.split('\n').collect::>()[0].to_string() -- cgit v1.2.3