mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 12:01:38 +00:00
Rename TransformResult -> TransformFileResult in preparation for two-way syncing
This commit is contained in:
parent
0f78eb933a
commit
b885cae086
3 changed files with 16 additions and 16 deletions
|
|
@ -2,7 +2,7 @@ use rbx::RbxItem;
|
|||
use vfs::VfsItem;
|
||||
use core::Route;
|
||||
|
||||
pub enum TransformResult {
|
||||
pub enum TransformFileResult {
|
||||
Value(Option<RbxItem>),
|
||||
Pass,
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@ pub enum FileChangeResult {
|
|||
}
|
||||
|
||||
pub trait Plugin {
|
||||
fn transform_file(&self, plugins: &PluginChain, vfs_item: &VfsItem) -> TransformResult;
|
||||
fn transform_file(&self, plugins: &PluginChain, vfs_item: &VfsItem) -> TransformFileResult;
|
||||
fn handle_file_change(&self, route: &Route) -> FileChangeResult;
|
||||
}
|
||||
|
||||
|
|
@ -31,8 +31,8 @@ impl PluginChain {
|
|||
pub fn transform_file(&self, vfs_item: &VfsItem) -> Option<RbxItem> {
|
||||
for plugin in &self.plugins {
|
||||
match plugin.transform_file(self, vfs_item) {
|
||||
TransformResult::Value(rbx_item) => return rbx_item,
|
||||
TransformResult::Pass => {},
|
||||
TransformFileResult::Value(rbx_item) => return rbx_item,
|
||||
TransformFileResult::Pass => {},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue