Skip to content

Commit 0683f81

Browse files
bors[bot]burrbull
andcommitted
Merge #307
307: fix warnings r=therealprof a=burrbull Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
2 parents dfc4d5b + 2c3d301 commit 0683f81

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mod generate;
1919
mod util;
2020

2121
use std::fs::File;
22-
use std::io::{self, Write};
22+
use std::io::Write;
2323
use std::process;
2424

2525
use clap::{App, Arg};

src/util.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,10 @@ impl U32Ext for u32 {
264264
fn to_ty(&self) -> Result<Ident> {
265265
Ok(match *self {
266266
1 => Ident::new("bool"),
267-
2...8 => Ident::new("u8"),
268-
9...16 => Ident::new("u16"),
269-
17...32 => Ident::new("u32"),
270-
33...64 => Ident::new("u64"),
267+
2..=8 => Ident::new("u8"),
268+
9..=16 => Ident::new("u16"),
269+
17..=32 => Ident::new("u32"),
270+
33..=64 => Ident::new("u64"),
271271
_ => Err(format!(
272272
"can't convert {} bits into a Rust integral type",
273273
*self
@@ -278,10 +278,10 @@ impl U32Ext for u32 {
278278
fn to_ty_width(&self) -> Result<u32> {
279279
Ok(match *self {
280280
1 => 1,
281-
2...8 => 8,
282-
9...16 => 16,
283-
17...32 => 32,
284-
33...64 => 64,
281+
2..=8 => 8,
282+
9..=16 => 16,
283+
17..=32 => 32,
284+
33..=64 => 64,
285285
_ => Err(format!(
286286
"can't convert {} bits into a Rust integral type width",
287287
*self

0 commit comments

Comments
 (0)