Remove unneeded maybe! (#7576)

This PR removes an unneeded `maybe!` from `get_permalink_to_line`.

As this is a `Result`-returning function, we don't need the inner level
of wrapping.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-02-08 11:52:18 -05:00 committed by GitHub
parent b25044393e
commit b77d452b90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8396,7 +8396,6 @@ impl Editor {
fn get_permalink_to_line(&mut self, cx: &mut ViewContext<Self>) -> Result<url::Url> {
use git::permalink::{build_permalink, BuildPermalinkParams};
let permalink = maybe!({
let project = self.project.clone().ok_or_else(|| anyhow!("no project"))?;
let project = project.read(cx);
@ -8438,8 +8437,6 @@ impl Editor {
path: &path,
selection: selection.map(|selection| selection.range()),
})
});
permalink
}
pub fn copy_permalink_to_line(&mut self, _: &CopyPermalinkToLine, cx: &mut ViewContext<Self>) {