Skip to content

Commit

Permalink
feat!: update to rust 1.74 and edition 2021
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Redondo committed Apr 23, 2024
1 parent 4665334 commit e1f9ab5
Show file tree
Hide file tree
Showing 19 changed files with 29 additions and 27 deletions.
3 changes: 2 additions & 1 deletion ar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
name = "lcar"
version = "0.1.0"
authors = ["Connor Horman <chorman64@gmail.com>"]
edition = "2018"
edition = "2021"
rust-version = "1.74"
license = "BSD-2-Clause-Patent"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
4 changes: 2 additions & 2 deletions arch-ops/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name = "arch-ops"
version = "0.1.0"
authors = ["Connor Horman <chorman@lcdev.xyz>", "rdrpenguin"]
description = "A library to encode and decode instructions for several architectures"
edition = "2018"
rust-version = "1.56"
edition = "2021"
rust-version = "1.74"
license = "BSD-2-Clause-Patent"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
5 changes: 2 additions & 3 deletions arch-ops/src/clever.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
convert::TryFrom,
io::{ErrorKind, Read, Write},
ops::{Range, RangeFrom, RangeFull, RangeInclusive, RangeTo, RangeToInclusive},
};
Expand Down Expand Up @@ -1058,7 +1057,7 @@ macro_rules! nop_instructions{
nop_instructions!(NOP0: Nop10, NOP1: Nop11, NOP2: Nop12, NOP3: Nop13);

macro_rules! print_h_field{
[$(($enum:ident {$($h:pat,)* $(, ..)?} => |$fmt:pat| $e:expr)),* $(,)?] => {
[$(($enum:ident {$($h:pat,)* $(, ..)?} => |$fmt:pat_param| $e:expr)),* $(,)?] => {
impl core::fmt::Display for CleverOpcode{
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result{
f.write_str(self.name())?;
Expand Down Expand Up @@ -1533,7 +1532,7 @@ impl CleverInstruction {

impl core::fmt::Display for CleverInstruction {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.opcode().fmt(f)?;
write!(f, "{:?}", self.opcode())?;

match self.opcode().operands() {
CleverOperandKind::Size => {
Expand Down
2 changes: 1 addition & 1 deletion arch-ops/src/holeybytes/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{convert::TryFrom, str::FromStr};
use std::str::FromStr;

pub mod codec;

Expand Down
3 changes: 2 additions & 1 deletion binfmt-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
name = "binfmt-test"
version = "0.1.0"
authors = ["Connor Horman <chorman64@gmail.com>"]
edition = "2018"
edition = "2021"
license = "BSD-2-Clause-Patent"
rust-version = "1.74"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
3 changes: 2 additions & 1 deletion binfmt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name = "binfmt"
version = "0.1.0"
authors = ["Connor Horman <chorman64@gmail.com>", "Ray Redondo <rdrpenguin04@gmail.com>"]
description = "A library for reading and writing binaries"
edition = "2018"
edition = "2021"
rust-version = "1.74"
license = "BSD-2-Clause-Patent"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
1 change: 0 additions & 1 deletion binfmt/src/ar.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
convert::TryFrom,
error::Error,
ffi::{CString, OsStr, OsString},
fmt::Display,
Expand Down
2 changes: 0 additions & 2 deletions binfmt/src/elf32/w65.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use crate::howto::{HowTo, HowToError};

use std::convert::TryFrom;

use super::consts;

#[non_exhaustive]
Expand Down
6 changes: 1 addition & 5 deletions binfmt/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@ use bytemuck::Pod;

use crate::traits::private::Sealed;
use core::{
convert::TryInto,
fmt::{Debug, LowerHex},
ops::*,
};
use std::{
convert::TryFrom,
io::{Read, Seek},
};
use std::io::{Read, Seek};

#[doc(hidden)]
pub(crate) mod private {
Expand Down
1 change: 0 additions & 1 deletion binfmt/src/xir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use core::{
char::CharTryFromError,
convert::TryFrom,
ops::{Deref, DerefMut, Index, IndexMut},
slice::SliceIndex,
};
Expand Down
2 changes: 1 addition & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
msrv = "1.54"
msrv = "1.74"
3 changes: 2 additions & 1 deletion dbg-info/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[package]
name = "dbg-info"
version = "0.1.0"
edition = "2018"
edition = "2021"
rust-version = "1.74"
license = "BSD-2-Clause-Patent"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
3 changes: 2 additions & 1 deletion lcas/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
name = "lcas-core"
version = "0.1.0"
authors = ["Connor <chorman64@gmail.com>"]
edition = "2018"
edition = "2021"
rust-version = "1.74"
license = "BSD-2-Clause-Patent"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
3 changes: 2 additions & 1 deletion lccc-mangle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
name = "xlang-mangle"
version = "0.1.0"
authors = ["Connor Horman <chorman64@gmail.com>"]
edition = "2018"
edition = "2021"
rust-version = "1.74"
license = "BSD-2-Clause-Patent"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
3 changes: 2 additions & 1 deletion lcld/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
name = "lcld"
version = "0.1.0"
authors = ["Connor Horman <chorman64@gmail.com>", "Ray Redondo <rdrpenguin04@gmail.com>"]
edition = "2018"
edition = "2021"
rust-version = "1.74"
license = "BSD-2-Clause-Patent"
build = "build/main.rs"

Expand Down
3 changes: 2 additions & 1 deletion lto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
name = "lto"
version = "0.1.0"
authors = ["Connor Horman <chorman64@gmail.com>"]
edition = "2018"
edition = "2021"
license = "BSD-2-Clause-Patent"
rust-version = "1.74"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
3 changes: 2 additions & 1 deletion m4/lcrust_prog_rustc.m4
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,8 @@ AC_DEFUN([LCRUST_PROG_CARGO],[
[package]
name = "cargotest"
version = "0.1.0"
edition = "2018"
edition = "2021"
rust-version = "1.74"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
3 changes: 2 additions & 1 deletion objdump/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
name = "objdump"
version = "0.1.0"
authors = ["Connor Horman <chorman64@gmail.com>"]
edition = "2018"
edition = "2021"
rust-version = "1.74"
license = "BSD-2-Clause-Patent"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
3 changes: 2 additions & 1 deletion readobj/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
name = "readobj"
version = "0.1.0"
authors = ["Connor Horman <chorman64@gmail.com>"]
edition = "2018"
edition = "2021"
rust-version = "1.74"
license = "BSD-2-Clause-Patent"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down

0 comments on commit e1f9ab5

Please sign in to comment.