Skip to content

Commit

Permalink
Bumped Dependencies (#51)
Browse files Browse the repository at this point in the history
* Updated term-table deprecated functions
* Bumped version
* Fixing failing linting on beta and nightly builds
  • Loading branch information
folkengine authored Aug 25, 2024
1 parent bcb3f1e commit 0ff76c3
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 34 deletions.
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cardpack"
description = "Generic Deck of Cards"
version = "0.5.1"
version = "0.5.2"
authors = ["electronicpanopticon <[email protected]>"]
repository = "https://github.com/ImperialBower/cardpack.rs.git"
homepage = "https://github.com/ImperialBower/cardpack.rs"
Expand All @@ -18,14 +18,14 @@ path = "src/lib.rs"

[dependencies]
colored = "2.1.0"
fluent-templates = "0.8.0"
fluent-templates = "0.10.1"
flume = "0.11.0"
lazy_static = "1.4.0"
log = "0.4.20"
log = "0.4.22"
rand = "0.8.5"
spin = "0.9.8"
term-table = "1.3.2"
unic-langid = { version = "0.9.4", features = ["macros"] }
term-table = "1.4.0"
unic-langid = { version = "0.9.5", features = ["macros"] }

[dev-dependencies]
rstest = "0.18.2"
rstest = "0.22.0"
38 changes: 21 additions & 17 deletions src/cards/decks/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,10 @@ impl BridgeBoard {
table.has_bottom_boarder = false;
table.separate_rows = false;
table.style = TableStyle::empty();
table.add_row(Row::new(vec![TableCell::new_with_alignment(
contents,
2,
Alignment::Left,
)]));
table.add_row(Row::new(vec![TableCell::builder(contents)
.col_span(2)
.alignment(Alignment::Left)
.build()]));
table.render()
}

Expand All @@ -150,20 +149,25 @@ impl BridgeBoard {
table.has_bottom_boarder = false;
table.separate_rows = false;
table.style = TableStyle::empty();
table.add_row(Row::new(vec![TableCell::new_with_alignment(
north,
2,
Alignment::Center,
)]));
table.add_row(Row::new(vec![TableCell::builder(north)
.col_span(2)
.alignment(Alignment::Center)
.build()]));

table.add_row(Row::new(vec![
TableCell::new_with_alignment(west, 1, Alignment::Left),
TableCell::new_with_alignment(east, 1, Alignment::Left),
TableCell::builder(west)
.col_span(1)
.alignment(Alignment::Left)
.build(),
TableCell::builder(east)
.col_span(1)
.alignment(Alignment::Left)
.build(),
]));
table.add_row(Row::new(vec![TableCell::new_with_alignment(
south,
2,
Alignment::Center,
)]));
table.add_row(Row::new(vec![TableCell::builder(south)
.col_span(2)
.alignment(Alignment::Center)
.build()]));
table.render()
}

Expand Down
2 changes: 0 additions & 2 deletions src/cards/pile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,6 @@ mod pile_tests {
let v = pile.cards_by_suit(qc.suit);

assert_eq!(expected, v);

format!("{}", pile.convert_to_rank_weighted().sort());
}

#[test]
Expand Down
11 changes: 2 additions & 9 deletions src/fluent/named.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use fluent_templates::{static_loader, Loader};
use log::error;
use unic_langid::{langid, LanguageIdentifier};

static_loader! {
Expand All @@ -25,15 +24,9 @@ pub trait Named {

/// This is the core method for getting fluent values. the index, long, and default weight
/// methods are all just methods simplifying the call to this method.
fn fluent_value(&self, key_section: &str, lid: &LanguageIdentifier) -> std::string::String {
fn fluent_value(&self, key_section: &str, lid: &LanguageIdentifier) -> String {
let id = format!("{}-{}", self.name(), key_section);
match LOCALES.lookup(lid, id.as_str()) {
None => {
error!("Invalid Fluent Template text_id: {}", lid);
String::from("_")
}
Some(s) => s,
}
LOCALES.lookup(lid, id.as_str())
}

/// Returns the value of the names' index in the fluent templates.
Expand Down

0 comments on commit 0ff76c3

Please sign in to comment.