From c1dbea197a6ba7e3d008e01c8169f5c3702151ea Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Wed, 11 Feb 2026 17:56:26 -0800 Subject: [Rust] Refactor `FileMetadata` file information - Rename and retype `FileMetadata::filename` and make the assignment required to happen at time of construction. - Add `FileMetadata::display_name` which is only to be used for presentation purposes. - Add `FileMetadata::virtual_path` for containers. - Rename `FileMetadata::modified` to `FileMetadata::is_modified` to be more consistent across codebase. - Add some missing documentation. - Add `BinaryView::from_metadata` with accompanying documentation. --- plugins/warp/src/plugin/create.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'plugins/warp/src/plugin') diff --git a/plugins/warp/src/plugin/create.rs b/plugins/warp/src/plugin/create.rs index 0c6a2fd5..2a748819 100644 --- a/plugins/warp/src/plugin/create.rs +++ b/plugins/warp/src/plugin/create.rs @@ -23,11 +23,7 @@ impl SaveFileField { let default_name = match file.project_file() { None => { // Not in a project, use the file name directly. - file.filename() - .split('/') - .last() - .unwrap_or("file") - .to_string() + file.display_name() } Some(project_file) => project_file.name(), }; -- cgit v1.3.1