update to edition 2021

This commit is contained in:
Damien Elmes 2021-11-18 20:51:10 +10:00
parent b4faa2f459
commit 26123ce229
11 changed files with 7 additions and 14 deletions

View File

@ -18,7 +18,7 @@ def setup_deps():
versions.check(minimum_bazel_version = "3.7.0") versions.check(minimum_bazel_version = "3.7.0")
rust_repositories( rust_repositories(
edition = "2018", edition = "2021",
include_rustc_srcs = False, include_rustc_srcs = False,
) )

View File

@ -1,7 +1,7 @@
[package] [package]
name = "rsbridge" name = "rsbridge"
version = "0.0.0" version = "0.0.0"
edition = "2018" edition = "2021"
authors = ["Ankitects Pty Ltd and contributors <https://help.ankiweb.net>"] authors = ["Ankitects Pty Ltd and contributors <https://help.ankiweb.net>"]
license = "AGPL-3.0-or-later" license = "AGPL-3.0-or-later"
description = "Anki's Rust library code Python bindings" description = "Anki's Rust library code Python bindings"

View File

@ -2,7 +2,7 @@
name = "anki" name = "anki"
version = "0.1.0" version = "0.1.0"
build = "build.rs" build = "build.rs"
edition = "2018" edition = "2021"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
winapi = {version = "0.3", features = ["wincon"]} winapi = {version = "0.3", features = ["wincon"]}

View File

@ -1,7 +1,7 @@
[package] [package]
name = "anki" name = "anki"
version = "0.0.0" version = "0.0.0"
edition = "2018" edition = "2021"
authors = ["Ankitects Pty Ltd and contributors"] authors = ["Ankitects Pty Ltd and contributors"]
license = "AGPL-3.0-or-later" license = "AGPL-3.0-or-later"
description = "Anki's Rust library code" description = "Anki's Rust library code"

View File

@ -1,7 +1,7 @@
[package] [package]
name = "anki_i18n" name = "anki_i18n"
version = "0.0.0" version = "0.0.0"
edition = "2018" edition = "2021"
authors = ["Ankitects Pty Ltd and contributors"] authors = ["Ankitects Pty Ltd and contributors"]
license = "AGPL-3.0-or-later" license = "AGPL-3.0-or-later"
description = "Anki's Rust library i18n code" description = "Anki's Rust library i18n code"

View File

@ -1,7 +1,7 @@
[package] [package]
name = "anki_i18n_helpers" name = "anki_i18n_helpers"
version = "0.0.0" version = "0.0.0"
edition = "2018" edition = "2021"
authors = ["Ankitects Pty Ltd and contributors"] authors = ["Ankitects Pty Ltd and contributors"]
license = "AGPL-3.0-or-later" license = "AGPL-3.0-or-later"
description = "Helpers for Anki's i18n system" description = "Helpers for Anki's i18n system"

View File

@ -1,8 +1,6 @@
// Copyright: Ankitects Pty Ltd and contributors // Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
use std::convert::{TryFrom, TryInto};
use super::Backend; use super::Backend;
pub(super) use crate::backend_proto::cards_service::Service as CardsService; pub(super) use crate::backend_proto::cards_service::Service as CardsService;
use crate::{ use crate::{

View File

@ -4,7 +4,7 @@
mod browser_table; mod browser_table;
mod search_node; mod search_node;
use std::{convert::TryInto, str::FromStr, sync::Arc}; use std::{str::FromStr, sync::Arc};
use super::{notes::to_note_ids, Backend}; use super::{notes::to_note_ids, Backend};
pub(super) use crate::backend_proto::search_service::Service as SearchService; pub(super) use crate::backend_proto::search_service::Service as SearchService;

View File

@ -1,8 +1,6 @@
// Copyright: Ankitects Pty Ltd and contributors // Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
use std::convert::{TryFrom, TryInto};
use itertools::Itertools; use itertools::Itertools;
use crate::{ use crate::{

View File

@ -6,7 +6,6 @@ pub(crate) mod undo;
use std::{ use std::{
borrow::Cow, borrow::Cow,
collections::{HashMap, HashSet}, collections::{HashMap, HashSet},
convert::TryInto,
}; };
use itertools::Itertools; use itertools::Itertools;

View File

@ -3,8 +3,6 @@
mod card; mod card;
use std::convert::{TryFrom, TryInto};
use crate::{ use crate::{
config::{ConfigKey, SchedulerVersion}, config::{ConfigKey, SchedulerVersion},
decks::{FilteredDeck, FilteredSearchTerm}, decks::{FilteredDeck, FilteredSearchTerm},