Skip to content

Commit

Permalink
Merge pull request #533 from cobalt-org/renovate/rust-1.x
Browse files Browse the repository at this point in the history
chore(deps): update msrv to v1.72
  • Loading branch information
epage committed Jan 24, 2024
2 parents 5934c16 + 184c31e commit c315419
Show file tree
Hide file tree
Showing 23 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .clippy.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
msrv = "1.70.0" # MSRV
msrv = "1.72" # MSRV
warn-on-all-wildcard-imports = true
allow-expect-in-tests = true
allow-unwrap-in-tests = true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ jobs:
- name: No-default features
run: cargo test --workspace --no-default-features
msrv:
name: "Check MSRV: 1.70.0"
name: "Check MSRV: 1.72"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.70" # MSRV
toolchain: "1.72" # MSRV
- uses: Swatinem/rust-cache@v2
- name: Default features
run: cargo check --workspace --all-targets
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.70" # MSRV
toolchain: "1.72" # MSRV
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Install SARIF tools
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ members = [
[workspace.package]
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.70.0" # MSRV
rust-version = "1.72" # MSRV
include = [
"build.rs",
"src/**/*",
Expand Down
2 changes: 1 addition & 1 deletion benches/handlebars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn make_data_handlebars() -> BTreeMap<String, Json> {

let mut teams = Vec::new();

for v in vec![
for v in [
("Jiangsu", 43u16),
("Beijing", 27u16),
("Guangzhou", 22u16),
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/model/scalar/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ fn parse_date_time(s: &str) -> Option<DateTimeImpl> {
format_description!("[weekday repr:short] [month repr:short] [day padding:none] [hour]:[minute]:[second] [year] [offset_hour sign:mandatory][offset_minute]"),
];

if let "" = s {
if s.is_empty() {
None
} else if let "now" | "today" = s.to_lowercase().trim() {
Some(DateTimeImpl::now_utc())
Expand Down
4 changes: 2 additions & 2 deletions crates/core/src/model/value/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ pub(crate) fn value_cmp(lhs: &dyn ValueView, rhs: &dyn ValueView) -> Option<Orde
if let (Some(x), Some(y)) = (lhs.as_array(), rhs.as_array()) {
return x
.values()
.map(|v| ValueViewCmp(v))
.partial_cmp(y.values().map(|v| ValueViewCmp(v)));
.map(ValueViewCmp)
.partial_cmp(y.values().map(ValueViewCmp));
}

if let (Some(x), Some(y)) = (lhs.as_object(), rhs.as_object()) {
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/runtime/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ impl Registers {
/// `get_mut`.
pub fn get_mut<T: std::any::Any + Default>(&self) -> std::cell::RefMut<'_, T> {
std::cell::RefMut::map(self.registers.borrow_mut(), |registers| {
registers.entry::<T>().or_insert_with(Default::default)
registers.entry::<T>().or_default()
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/jekyll/include_tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct IncludeTag;

impl IncludeTag {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/stdlib/blocks/capture_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub struct CaptureBlock;

impl CaptureBlock {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/stdlib/blocks/case_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct CaseBlock;

impl CaseBlock {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/stdlib/blocks/comment_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub struct CommentBlock;

impl CommentBlock {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down
6 changes: 3 additions & 3 deletions crates/lib/src/stdlib/blocks/for_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub struct ForBlock;

impl ForBlock {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down Expand Up @@ -266,7 +266,7 @@ pub struct TableRowBlock;

impl TableRowBlock {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down Expand Up @@ -576,7 +576,7 @@ impl<'r> Range<'r> {

fn get_array(array: &dyn ValueView) -> Result<Vec<ValueCow<'_>>> {
if let Some(x) = array.as_array() {
Ok(x.values().map(|v| ValueCow::Borrowed(v)).collect())
Ok(x.values().map(ValueCow::Borrowed).collect())
} else if let Some(x) = array.as_object() {
let x = x
.iter()
Expand Down
4 changes: 2 additions & 2 deletions crates/lib/src/stdlib/blocks/if_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub struct IfBlock;

impl IfBlock {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down Expand Up @@ -97,7 +97,7 @@ pub struct UnlessBlock;

impl UnlessBlock {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/stdlib/blocks/ifchanged_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct IfChangedBlock;

impl IfChangedBlock {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/stdlib/blocks/raw_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub struct RawBlock;

impl RawBlock {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/stdlib/tags/assign_tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct AssignTag;

impl AssignTag {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/stdlib/tags/cycle_tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct CycleTag;

impl CycleTag {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/stdlib/tags/include_tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct IncludeTag;

impl IncludeTag {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down
4 changes: 2 additions & 2 deletions crates/lib/src/stdlib/tags/increment_tags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct IncrementTag;

impl IncrementTag {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down Expand Up @@ -75,7 +75,7 @@ pub struct DecrementTag;

impl DecrementTag {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down
4 changes: 2 additions & 2 deletions crates/lib/src/stdlib/tags/interrupt_tags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub struct BreakTag;

impl BreakTag {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down Expand Up @@ -60,7 +60,7 @@ pub struct ContinueTag;

impl ContinueTag {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/stdlib/tags/render_tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub struct RenderTag;

impl RenderTag {
pub fn new() -> Self {
Self::default()
Self
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/conformance_ruby/error_handling_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ fn test_syntax_errors_in_nested_blocks_have_correct_line_number() {
);
let err = err.to_string();

let expected = regex::Regex::new(r#"\bline 5\b"#).unwrap();
let expected = regex::Regex::new(r"\bline 5\b").unwrap();
println!("err={}", err);
assert!(expected.is_match(&err));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/conformance_ruby/standard_filter_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ fn test_strip_html() {
v!("test"),
call_filter!(
liquid_lib::stdlib::StripHtml,
v!(r#"<!-- foo bar \n test -->test"#)
v!(r"<!-- foo bar \n test -->test")
)
.unwrap()
);
Expand Down

0 comments on commit c315419

Please sign in to comment.