Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e0b1c9a

Browse files
committed
Refactoring to use a string. Makes it so we don't have to have the layout somewhere downstream of /host.
1 parent d0116c5 commit e0b1c9a

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/main.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,7 @@ impl ZellijPlugin for State {
5151
// assets/multitask_layout.kdl
5252
self.layout = match config.get("layout") {
5353
Some(s) => {
54-
match std::fs::read_to_string(PathBuf::from("/host").join(s)) {
55-
Ok(str) => str,
56-
Err(e) => {
57-
eprintln!("{}", e);
58-
String::from(include_str!("assets/multitask_layout.kdl"))
59-
}
60-
}
54+
s.to_string()
6155
},
6256
_ => String::from(include_str!("assets/multitask_layout.kdl"))
6357
};

0 commit comments

Comments
 (0)