Skip to content

Commit 9ff887c

Browse files
authored
reafactor: remove unnecessary async (#62)
1 parent e5f3baa commit 9ff887c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

crates/metassr-server/src/rebuilder.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl Rebuilder {
108108
Ok(rebuild_type)
109109
}
110110

111-
pub async fn rebuild(&self, rebuild_type: RebuildType) -> Result<()> {
111+
pub fn rebuild(&self, rebuild_type: RebuildType) -> Result<()> {
112112
if self.is_rebuilding.swap(true, Ordering::SeqCst) {
113113
return Ok(()); // Already rebuilding, skip
114114
}
@@ -117,7 +117,7 @@ impl Rebuilder {
117117
RebuildType::Page(ref path) => {
118118
debug!("entered rebuilding {:?} in {:?}", rebuild_type, path);
119119

120-
self.rebuild_page(path.clone()).await?;
120+
self.rebuild_page(path.clone())?;
121121
match self.sender.send(rebuild_type.clone()) {
122122
Ok(rec) => {
123123
debug!("Sent to: {rec} receivers")
@@ -149,7 +149,7 @@ impl Rebuilder {
149149
Ok(())
150150
}
151151

152-
async fn rebuild_page(&self, path: PathBuf) -> Result<()> {
152+
fn rebuild_page(&self, path: PathBuf) -> Result<()> {
153153
debug!("Rebuilding page {:?}", path);
154154

155155
debug!("Rebuilding page Rel path: {:?} Rebuilding page ", path);
@@ -211,7 +211,7 @@ impl Rebuilder {
211211
}
212212

213213
#[allow(dead_code)]
214-
async fn rebuild_all_pages(&self) -> Result<()> {
214+
fn rebuild_all_pages(&self) -> Result<()> {
215215
todo!("iterate entered rebuilding rebuild_page() on all pages")
216216
}
217217
}

metassr-cli/src/cli/dev.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ impl Dev {
9898
.clone()
9999
// .expect("Rebuild failed")
100100
.rebuild(rebuild_type)
101-
.await
102101
{
103102
error!("Rebuild failed: {}", e);
104103
}

0 commit comments

Comments
 (0)