Updated api bootstrap
This commit is contained in:
@@ -16,7 +16,7 @@ pub class Module {
|
||||
pub constructor(PathBuf mist_path, MistConfig& config) {
|
||||
self.children = Vec::new();
|
||||
self.name = mist_path.file_stem()
|
||||
.and_then(fn(s) -> s.to_str())
|
||||
.and_then((s) => s.to_str())
|
||||
.expect("Failed to get module name")
|
||||
.to_string();
|
||||
self.path = mist_path;
|
||||
@@ -66,7 +66,7 @@ pub class Module {
|
||||
}
|
||||
|
||||
pub bool is_package(&self) {
|
||||
self.path.file_name().map(fn(v) -> v.to_str()).unwrap_or_default() == Some("package.mist")
|
||||
self.path.file_name().map((v) => v.to_str()).unwrap_or_default() == Some("package.mist")
|
||||
}
|
||||
|
||||
pub PathBuf output_dir(&self, PathBuf& parent_dir) {
|
||||
|
||||
Reference in New Issue
Block a user