melib: update to 2021 edition

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
feature/sieve
Manos Pitsidianakis 2023-09-13 18:47:00 +03:00
parent 81974311c2
commit fe0a96f085
Signed by: Manos Pitsidianakis
GPG Key ID: 7729C7707F7E09D0
6 changed files with 3 additions and 6 deletions

View File

@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
"meli",

View File

@ -2,7 +2,7 @@
name = "melib"
version = "0.8.0"
authors = ["Manos Pitsidianakis <manos@pitsidianak.is>"]
edition = "2018"
edition = "2021"
build = "build.rs"
rust-version = "1.65.0"

View File

@ -149,7 +149,6 @@ impl Write for Data {
impl Seek for Data {
#[inline]
fn seek(&mut self, pos: io::SeekFrom) -> io::Result<u64> {
use std::convert::TryInto;
let (off, whence) = match pos {
io::SeekFrom::Start(off) => (off.try_into().unwrap_or(i64::MAX), libc::SEEK_SET),
io::SeekFrom::End(off) => (off.saturating_abs(), libc::SEEK_END),

View File

@ -1216,7 +1216,6 @@ impl MailBackend for ImapType {
for l in response.split_rn() {
if l.starts_with(b"* SEARCH") {
use std::iter::FromIterator;
let uid_index = uid_store.uid_index.lock()?;
return Ok(SmallVec::from_iter(
String::from_utf8_lossy(l[b"* SEARCH".len()..].trim())

View File

@ -1091,7 +1091,6 @@ pub fn split_lines_reflow(text: &str, reflow: Reflow, width: Option<usize>) -> V
continue;
}
let segment_tree = {
use std::iter::FromIterator;
let mut t: smallvec::SmallVec<[usize; 1024]> =
smallvec::SmallVec::from_iter(std::iter::repeat(0).take(line.len()));
for (idx, _g) in UnicodeSegmentation::grapheme_indices(line, true) {
@ -1568,7 +1567,6 @@ impl Iterator for LineBreakText {
),
prev_break: 0,
segment_tree: {
use std::iter::FromIterator;
let mut t: smallvec::SmallVec<[usize; 1024]> =
smallvec::SmallVec::from_iter(
std::iter::repeat(0).take(line.len()),

View File

@ -69,7 +69,7 @@ impl ShellExpandTrait for Path {
#[cfg(target_os = "linux")]
fn complete(&self, force: bool) -> SmallVec<[String; 128]> {
use std::{convert::TryFrom, os::unix::io::AsRawFd};
use std::os::unix::io::AsRawFd;
use libc::dirent64;
use nix::fcntl::OFlag;