Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make some small cleanups #1395

Merged
merged 3 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/fj-host/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ impl Host {
pub fn from_model(model: Model) -> Result<Self, Error> {
let watch_path = model.watch_path();
let evaluator = Evaluator::from_model(model);
let _watcher = Watcher::watch_model(&watch_path, &evaluator)?;
let watcher = Watcher::watch_model(&watch_path, &evaluator)?;

Ok(Self {
evaluator,
_watcher,
_watcher: watcher,
})
}

Expand Down
8 changes: 4 additions & 4 deletions crates/fj-host/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,16 @@ impl Model {

let version_pkg_model: libloading::Symbol<*const Version> =
lib.get(b"VERSION_PKG").map_err(Error::LoadingVersion)?;
let version_pkg_mode = (**version_pkg_model).to_string();
let version_pkg_model = (**version_pkg_model).to_string();

debug!(
"Comparing package versions (host: {}, model: {})",
version_pkg_host, version_pkg_mode
version_pkg_host, version_pkg_model
);
if version_pkg_host != version_pkg_mode {
if version_pkg_host != version_pkg_model {
let host = String::from_utf8_lossy(version_pkg_host.as_bytes())
.into_owned();
let model = version_pkg_mode;
let model = version_pkg_model;

return Err(Error::VersionMismatch { host, model });
}
Expand Down
6 changes: 4 additions & 2 deletions crates/fj-window/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,10 @@ pub fn run(
Ok(new_host) => {
host = Some(new_host);
}
Err(_) => {
status.update_status("Error creating host.");
Err(err) => {
status.update_status(&format!(
"Error creating host: {err}"
));
}
}
}
Expand Down