Skip to content

Commit

Permalink
internal: Make TryToNav trait public
Browse files Browse the repository at this point in the history
Currently there is no proper way to get a target FileRange for a given
Definition.
  • Loading branch information
Waqar144 committed Jan 22, 2024
1 parent d410d4a commit 231f730
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/ide/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ use syntax::SourceFile;
use triomphe::Arc;
use view_memory_layout::{view_memory_layout, RecursiveMemoryLayout};

use crate::navigation_target::{ToNav, TryToNav};
use crate::navigation_target::ToNav;

pub use crate::{
annotations::{Annotation, AnnotationConfig, AnnotationKind, AnnotationLocation},
Expand All @@ -104,7 +104,7 @@ pub use crate::{
SymbolInformationKind,
},
move_item::Direction,
navigation_target::{NavigationTarget, UpmappingResult},
navigation_target::{NavigationTarget, TryToNav, UpmappingResult},
prime_caches::ParallelPrimeCachesProgress,
references::ReferenceSearchResult,
rename::RenameError,
Expand Down
2 changes: 1 addition & 1 deletion crates/ide/src/navigation_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub(crate) trait ToNav {
fn to_nav(&self, db: &RootDatabase) -> UpmappingResult<NavigationTarget>;
}

pub(crate) trait TryToNav {
pub trait TryToNav {
fn try_to_nav(&self, db: &RootDatabase) -> Option<UpmappingResult<NavigationTarget>>;
}

Expand Down

0 comments on commit 231f730

Please sign in to comment.