Skip to content

Commit 55b35df

Browse files
committed
[Rust] Fix misc inconsistencies in 2ba29fd
1 parent 9faef8a commit 55b35df

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rust/src/project.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ impl Project {
578578
/// Retrieve a list of files in the project by the `path` inside the project.
579579
///
580580
/// Because a [`ProjectFile`] name is not unique, this returns a list instead of a single [`ProjectFile`].
581-
pub fn files_by_path_in_project(&self, path: &Path) -> Array<ProjectFile> {
581+
pub fn files_by_project_path(&self, path: &Path) -> Array<ProjectFile> {
582582
let path_raw = path.to_cstr();
583583
let mut count = 0;
584584
let result = unsafe {

rust/src/project/file.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ impl ProjectFile {
4747
}
4848

4949
/// Get the path in the project to this file's contents
50-
pub fn path_in_project(&self) -> Option<PathBuf> {
50+
pub fn path_in_project(&self) -> PathBuf {
5151
let path_str =
5252
unsafe { BnString::into_string(BNProjectFileGetPathInProject(self.handle.as_ptr())) };
53-
Some(PathBuf::from(path_str))
53+
PathBuf::from(path_str)
5454
}
5555

5656
/// Check if this file's contents exist on disk

0 commit comments

Comments
 (0)