Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen committed Jan 31, 2025
1 parent 4a5babc commit 036e7de
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/portable/project/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ fn do_init(
let handle = project::Handle {
name: name.into(),
project_dir: project.location.root.clone(),
schema_dir: project.resolve_schema_dir()?.into(),
schema_dir: project.resolve_schema_dir()?,
instance,
database: options.database.clone(),
};
Expand Down Expand Up @@ -453,7 +453,7 @@ fn do_cloud_init(
let handle = project::Handle {
name: full_name.clone(),
project_dir: project.location.root.clone(),
schema_dir: project.resolve_schema_dir()?.into(),
schema_dir: project.resolve_schema_dir()?,
instance: project::InstanceKind::Remote,
database: Some(database.to_owned()),
};
Expand Down
2 changes: 1 addition & 1 deletion src/watch/fs_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl FsWatcher {

#[allow(dead_code)]
pub fn clear_queue(&mut self) {
while let Ok(_) = self.rx.try_recv() {}
while self.rx.try_recv().is_ok() {}
}

/// Waits for either changes in fs, timeout or interrupt signal
Expand Down
2 changes: 1 addition & 1 deletion src/watch/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub fn run(options: &Options, _watch: &WatchCommand) -> anyhow::Result<()> {
);
runtime.block_on(async {
let mut retry_timeout = None::<Duration>;
while let Ok(_) = watcher.wait(retry_timeout).await {
while watcher.wait(retry_timeout).await.is_ok() {
if let Err(e) = ctx.do_update().await {
log::error!("Error updating database: {e:#}. Will retry in 10s.");
retry_timeout = Some(Duration::from_secs(10));
Expand Down
2 changes: 1 addition & 1 deletion src/watch/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
mod fs_watcher;
mod main;

pub use main::run;
pub use fs_watcher::FsWatcher;
pub use main::run;

#[derive(clap::Args, Debug, Clone)]
pub struct WatchCommand {
Expand Down

0 comments on commit 036e7de

Please sign in to comment.