Skip to content

Commit

Permalink
build: update rust toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
ImJeremyHe committed Jun 3, 2024
1 parent 2499037 commit e4c04af
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 76 deletions.
65 changes: 9 additions & 56 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions crates/controller/src/calc_engine/calculator/funcs/mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn count_an_arg(
Value::Number(num) => {
let s = num.to_string();
let l = bmap.len();
let mut insert = bmap.entry(s).or_insert((0, l));
let insert = bmap.entry(s).or_insert((0, l));
insert.0 += 1;
Ok(())
}
Expand All @@ -56,7 +56,7 @@ fn count_an_arg(
Value::Number(num) => {
let s = num.to_string();
let l = bmap.len();
let mut insert = bmap.entry(s).or_insert((0, l));
let insert = bmap.entry(s).or_insert((0, l));
insert.0 += 1;
}
_ => {}
Expand All @@ -68,7 +68,7 @@ fn count_an_arg(
Value::Number(num) => {
let s = num.to_string();
let l = bmap.len();
let mut insert = bmap.entry(s).or_insert((0, l));
let insert = bmap.entry(s).or_insert((0, l));
insert.0 += 1;
}
_ => {}
Expand Down
1 change: 0 additions & 1 deletion crates/controller/src/connectors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ pub use container_connector::ContainerConnector;
pub use cube_connector::CubeConnector;
pub use formula_connector::FormulaConnector;
pub use id_fetcher::IdFetcher;
pub use index_fetcher::IndexFetcher;
pub use name_fetcher::NameFetcher;
pub use navigator_connector::NavigatorConnector;
pub use range_connector::RangeConnector;
Expand Down
4 changes: 2 additions & 2 deletions crates/controller/src/container/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl ContainerExecutor {
.fetch_sheet_id_by_index(p.sheet_idx)
.map_err(|l| BasicError::SheetIdxExceed(l))?;
let col_id = ctx.fetch_col_id(&sheet_id, p.col)?;
let mut info = self.container.get_col_info_mut(sheet_id, col_id);
let info = self.container.get_col_info_mut(sheet_id, col_id);
info.custom_width = true;
info.width = Some(p.width);
Ok((self, true))
Expand All @@ -100,7 +100,7 @@ impl ContainerExecutor {
.fetch_sheet_id_by_index(p.sheet_idx)
.map_err(|l| BasicError::SheetIdxExceed(l))?;
let row_id = ctx.fetch_row_id(&sheet_id, p.row)?;
let mut info = self.container.get_row_info_mut(sheet_id, row_id);
let info = self.container.get_row_info_mut(sheet_id, row_id);
info.custom_height = true;
info.ht = Some(p.height);
Ok((self, true))
Expand Down
4 changes: 2 additions & 2 deletions crates/controller/src/navigator/id_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl IdManager {
.find(|p| {
!row_ids
.iter()
.any(|c| self.has_allocated.contains(&(*p.clone(), c.clone())))
.any(|c| self.has_allocated.contains(&(**p, c.clone())))
})
.map_or(
{
Expand All @@ -75,7 +75,7 @@ impl IdManager {
.find(|p| {
!row_ids
.iter()
.any(|r| self.has_allocated.contains(&(r.clone(), *p.clone())))
.any(|r| self.has_allocated.contains(&(r.clone(), **p)))
})
.map_or(
{
Expand Down
7 changes: 2 additions & 5 deletions crates/controller/src/navigator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ use logisheets_base::{
errors::BasicError, BlockCellId, BlockId, CellId, ColId, NormalCellId, RowId, SheetId,
};

pub use self::{
block::BlockPlace,
sheet_nav::{Cache, SheetNav},
};
pub use self::{block::BlockPlace, sheet_nav::SheetNav};

mod block;
pub mod ctx;
Expand Down Expand Up @@ -153,7 +150,7 @@ impl Navigator {
.fetch_norm_cell_id(&sheet_id, row_idx, col_idx)
.unwrap();
let sheet_nav = self.get_sheet_nav_mut(sheet_id);
if let Some(mut bp) = sheet_nav.data.blocks.get_mut(&block_id) {
if let Some(bp) = sheet_nav.data.blocks.get_mut(&block_id) {
bp.master = new_master;
sheet_nav.cache = Default::default();
}
Expand Down
6 changes: 0 additions & 6 deletions crates/wasms/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ serde-wasm-bindgen = "0.5"
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
# code size when deploying.
console_error_panic_hook = {version = "0.1.6", optional = true}
# `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size
# compared to the default allocator's ~10K. It is slower than the default
# allocator, however.
#
# Unfortunately, `wee_alloc` requires nightly Rust when targeting wasm for now.
wee_alloc = {version = "0.4.5", optional = true}

logisheets_controller = {version = "*", path = "../../controller", features = ["gents"]}
logisheets_base = {version = "*", path = "../../controller/base"}
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.70
1.76

0 comments on commit e4c04af

Please sign in to comment.