remove some reexports

This commit is contained in:
Marcel Märtens 2021-07-29 20:47:45 +02:00
parent c3aa4c54a9
commit 4c0b74150d
52 changed files with 104 additions and 121 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
export VELOREN_ASSETS="$(pwd)/assets" export VELOREN_ASSETS="$(pwd)/assets"
rm -r target/debug/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly rm -r target/debug/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
time cargo test --package veloren-i18n --lib test_all_localizations -- --nocapture --ignored && time cargo test --package veloren-voxygen-i18n --lib test_all_localizations -- --nocapture --ignored &&
time cargo test --package veloren-common-assets asset_tweak::tests --features asset_tweak --lib && time cargo test --package veloren-common-assets asset_tweak::tests --features asset_tweak --lib &&
( rm -r target/debug/incremental* || echo "all good" ) && # TMP FIX FOR 2021-03-22-nightly ( rm -r target/debug/incremental* || echo "all good" ) && # TMP FIX FOR 2021-03-22-nightly
time cargo test time cargo test

30
Cargo.lock generated
View File

@ -6017,20 +6017,6 @@ dependencies = [
"veloren-common-net", "veloren-common-net",
] ]
[[package]]
name = "veloren-i18n"
version = "0.10.0"
dependencies = [
"clap",
"deunicode",
"git2",
"hashbrown 0.11.2",
"ron",
"serde",
"tracing",
"veloren-common-assets",
]
[[package]] [[package]]
name = "veloren-network" name = "veloren-network"
version = "0.3.0" version = "0.3.0"
@ -6236,10 +6222,10 @@ dependencies = [
"veloren-common-net", "veloren-common-net",
"veloren-common-state", "veloren-common-state",
"veloren-common-systems", "veloren-common-systems",
"veloren-i18n",
"veloren-server", "veloren-server",
"veloren-voxygen-anim", "veloren-voxygen-anim",
"veloren-voxygen-egui", "veloren-voxygen-egui",
"veloren-voxygen-i18n",
"veloren-world", "veloren-world",
"wgpu", "wgpu",
"wgpu-profiler", "wgpu-profiler",
@ -6295,6 +6281,20 @@ dependencies = [
"veloren-voxygen-egui", "veloren-voxygen-egui",
] ]
[[package]]
name = "veloren-voxygen-i18n"
version = "0.10.0"
dependencies = [
"clap",
"deunicode",
"git2",
"hashbrown 0.11.2",
"ron",
"serde",
"tracing",
"veloren-common-assets",
]
[[package]] [[package]]
name = "veloren-world" name = "veloren-world"
version = "0.10.0" version = "0.10.0"

View File

@ -46,7 +46,7 @@ common-systems = {package = "veloren-common-systems", path = "../common/systems"
common-state = {package = "veloren-common-state", path = "../common/state"} common-state = {package = "veloren-common-state", path = "../common/state"}
anim = {package = "veloren-voxygen-anim", path = "anim"} anim = {package = "veloren-voxygen-anim", path = "anim"}
i18n = {package = "veloren-i18n", path = "i18n"} i18n = {package = "veloren-voxygen-i18n", path = "i18n"}
voxygen-egui = {package = "veloren-voxygen-egui", path = "egui", optional = true } voxygen-egui = {package = "veloren-voxygen-egui", path = "egui", optional = true }
# Graphics # Graphics

View File

@ -1,7 +1,7 @@
[package] [package]
authors = ["juliancoffee <lightdarkdaughter@gmail.com>", "Rémy Phelipot"] authors = ["juliancoffee <lightdarkdaughter@gmail.com>", "Rémy Phelipot"]
edition = "2018" edition = "2018"
name = "veloren-i18n" name = "veloren-voxygen-i18n"
description = "Crate for internalization and diagnostic of existing localizations." description = "Crate for internalization and diagnostic of existing localizations."
version = "0.10.0" version = "0.10.0"

View File

@ -1,5 +1,5 @@
use clap::{App, Arg}; use clap::{App, Arg};
use veloren_i18n::{analysis, verification}; use veloren_voxygen_i18n::{analysis, verification, BasePath};
fn main() { fn main() {
let matches = App::new("i18n-check") let matches = App::new("i18n-check")
@ -36,7 +36,7 @@ fn main() {
// Generate paths // Generate paths
let root_path = common_assets::find_root().expect("Failed to find root of repository"); let root_path = common_assets::find_root().expect("Failed to find root of repository");
let path = veloren_i18n::BasePath::new(&root_path); let path = BasePath::new(&root_path);
let be_verbose = matches.is_present("verbose"); let be_verbose = matches.is_present("verbose");
let csv_enabled = matches.is_present("csv"); let csv_enabled = matches.is_present("csv");

View File

@ -7,7 +7,6 @@ use super::{
}; };
use crate::{ use crate::{
game_input::GameInput, game_input::GameInput,
i18n::Localization,
ui::{ ui::{
fonts::Fonts, fonts::Fonts,
slot::{ContentSize, SlotMaker}, slot::{ContentSize, SlotMaker},
@ -31,6 +30,7 @@ use conrod_core::{
widget::{self, Button, Image, Rectangle, Scrollbar, State as ConrodState, Text}, widget::{self, Button, Image, Rectangle, Scrollbar, State as ConrodState, Text},
widget_ids, Color, Colorable, Positionable, Scalar, Sizeable, UiCell, Widget, WidgetCommon, widget_ids, Color, Colorable, Positionable, Scalar, Sizeable, UiCell, Widget, WidgetCommon,
}; };
use i18n::Localization;
use crate::hud::slots::SlotKind; use crate::hud::slots::SlotKind;
use specs::Entity as EcsEntity; use specs::Entity as EcsEntity;

View File

@ -4,10 +4,10 @@ use super::{
}; };
use crate::{ use crate::{
hud::{self, BuffPosition}, hud::{self, BuffPosition},
i18n::Localization,
ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable}, ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable},
GlobalState, GlobalState,
}; };
use i18n::Localization;
use common::comp::{BuffKind, Buffs, Energy, Health}; use common::comp::{BuffKind, Buffs, Energy, Health};
use conrod_core::{ use conrod_core::{

View File

@ -4,7 +4,6 @@ use super::{
}; };
use crate::{ use crate::{
game_input::GameInput, game_input::GameInput,
i18n::Localization,
ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable}, ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable},
window::KeyMouse, window::KeyMouse,
GlobalState, GlobalState,
@ -15,6 +14,7 @@ use conrod_core::{
widget::{self, Button, Image, Text}, widget::{self, Button, Image, Text},
widget_ids, Color, Colorable, Positionable, Sizeable, UiCell, Widget, WidgetCommon, widget_ids, Color, Colorable, Positionable, Sizeable, UiCell, Widget, WidgetCommon,
}; };
use i18n::Localization;
widget_ids! { widget_ids! {
struct Ids { struct Ids {
bag, bag,

View File

@ -2,7 +2,7 @@ use super::{
img_ids::Imgs, ChatTab, ERROR_COLOR, FACTION_COLOR, GROUP_COLOR, INFO_COLOR, KILL_COLOR, img_ids::Imgs, ChatTab, ERROR_COLOR, FACTION_COLOR, GROUP_COLOR, INFO_COLOR, KILL_COLOR,
OFFLINE_COLOR, ONLINE_COLOR, REGION_COLOR, SAY_COLOR, TELL_COLOR, TEXT_COLOR, WORLD_COLOR, OFFLINE_COLOR, ONLINE_COLOR, REGION_COLOR, SAY_COLOR, TELL_COLOR, TEXT_COLOR, WORLD_COLOR,
}; };
use crate::{i18n::Localization, settings::chat::MAX_CHAT_TABS, ui::fonts::Fonts, GlobalState}; use crate::{settings::chat::MAX_CHAT_TABS, ui::fonts::Fonts, GlobalState};
use client::{cmd, Client}; use client::{cmd, Client};
use common::comp::{ use common::comp::{
chat::{KillSource, KillType}, chat::{KillSource, KillType},
@ -22,6 +22,7 @@ use conrod_core::{
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Ui, UiCell, Widget, widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Ui, UiCell, Widget,
WidgetCommon, WidgetCommon,
}; };
use i18n::Localization;
use std::collections::{HashSet, VecDeque}; use std::collections::{HashSet, VecDeque};
widget_ids! { widget_ids! {

View File

@ -4,12 +4,9 @@ use super::{
item_imgs::{animate_by_pulse, ItemImgs, ItemKey::Tool}, item_imgs::{animate_by_pulse, ItemImgs, ItemKey::Tool},
Show, TEXT_COLOR, TEXT_DULL_RED_COLOR, TEXT_GRAY_COLOR, UI_HIGHLIGHT_0, UI_MAIN, Show, TEXT_COLOR, TEXT_DULL_RED_COLOR, TEXT_GRAY_COLOR, UI_HIGHLIGHT_0, UI_MAIN,
}; };
use crate::{ use crate::ui::{
i18n::Localization,
ui::{
fonts::Fonts, ImageFrame, ItemTooltip, ItemTooltipManager, ItemTooltipable, Tooltip, fonts::Fonts, ImageFrame, ItemTooltip, ItemTooltipManager, ItemTooltipable, Tooltip,
TooltipManager, Tooltipable, TooltipManager, Tooltipable,
},
}; };
use client::{self, Client}; use client::{self, Client};
use common::{ use common::{
@ -29,6 +26,7 @@ use conrod_core::{
widget::{self, Button, Image, Rectangle, Scrollbar, Text, TextEdit}, widget::{self, Button, Image, Rectangle, Scrollbar, Text, TextEdit},
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use i18n::Localization;
use std::sync::Arc; use std::sync::Arc;
use strum::IntoEnumIterator; use strum::IntoEnumIterator;

View File

@ -3,16 +3,14 @@ use super::{
item_imgs::{animate_by_pulse, ItemImgs, ItemKey::Tool}, item_imgs::{animate_by_pulse, ItemImgs, ItemKey::Tool},
Show, CRITICAL_HP_COLOR, HP_COLOR, TEXT_COLOR, UI_HIGHLIGHT_0, UI_MAIN, XP_COLOR, Show, CRITICAL_HP_COLOR, HP_COLOR, TEXT_COLOR, UI_HIGHLIGHT_0, UI_MAIN, XP_COLOR,
}; };
use crate::{ use crate::ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable};
i18n::Localization,
ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable},
};
use conrod_core::{ use conrod_core::{
color, color,
image::Id, image::Id,
widget::{self, button, Button, Image, Rectangle, Text}, widget::{self, button, Button, Image, Rectangle, Text},
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, UiCell, Widget, WidgetCommon, widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, UiCell, Widget, WidgetCommon,
}; };
use i18n::Localization;
use client::{self, Client}; use client::{self, Client};
use common::comp::{ use common::comp::{

View File

@ -1,9 +1,10 @@
use super::{img_ids::Imgs, settings_window::SettingsTab, TEXT_COLOR}; use super::{img_ids::Imgs, settings_window::SettingsTab, TEXT_COLOR};
use crate::{i18n::Localization, ui::fonts::Fonts}; use crate::ui::fonts::Fonts;
use conrod_core::{ use conrod_core::{
widget::{self, Button, Image}, widget::{self, Button, Image},
widget_ids, Color, Labelable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Color, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use i18n::Localization;
widget_ids! { widget_ids! {
struct Ids { struct Ids {

View File

@ -9,7 +9,6 @@ use super::{
use crate::{ use crate::{
game_input::GameInput, game_input::GameInput,
hud, hud,
i18n::Localization,
settings::Settings, settings::Settings,
ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable}, ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable},
GlobalState, GlobalState,
@ -27,6 +26,7 @@ use conrod_core::{
widget::{self, Button, Image, Rectangle, Scrollbar, Text}, widget::{self, Button, Image, Rectangle, Scrollbar, Text},
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use i18n::Localization;
use specs::{saveload::MarkerAllocator, WorldExt}; use specs::{saveload::MarkerAllocator, WorldExt};
widget_ids! { widget_ids! {

View File

@ -4,10 +4,7 @@ use super::{
item_imgs::ItemImgs, item_imgs::ItemImgs,
Show, Windows, TEXT_COLOR, Show, Windows, TEXT_COLOR,
}; };
use crate::{ use crate::ui::{fonts::Fonts, ImageFrame, ItemTooltip, ItemTooltipManager, ItemTooltipable};
i18n::Localization,
ui::{fonts::Fonts, ImageFrame, ItemTooltip, ItemTooltipManager, ItemTooltipable},
};
use client::Client; use client::Client;
use common::comp::inventory::item::{ItemDef, MaterialStatManifest, Quality}; use common::comp::inventory::item::{ItemDef, MaterialStatManifest, Quality};
use conrod_core::{ use conrod_core::{
@ -16,6 +13,7 @@ use conrod_core::{
widget::{self, Image, List, Rectangle, Scrollbar, Text}, widget::{self, Image, List, Rectangle, Scrollbar, Text},
widget_ids, Color, Colorable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Color, Colorable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use i18n::Localization;
use std::{collections::VecDeque, sync::Arc}; use std::{collections::VecDeque, sync::Arc};
widget_ids! { widget_ids! {

View File

@ -4,7 +4,6 @@ use super::{
TEXT_BG, TEXT_BLUE_COLOR, TEXT_COLOR, TEXT_GRAY_COLOR, TEXT_VELORITE, UI_HIGHLIGHT_0, UI_MAIN, TEXT_BG, TEXT_BLUE_COLOR, TEXT_COLOR, TEXT_GRAY_COLOR, TEXT_VELORITE, UI_HIGHLIGHT_0, UI_MAIN,
}; };
use crate::{ use crate::{
i18n::Localization,
session::settings_change::{Interface as InterfaceChange, Interface::*}, session::settings_change::{Interface as InterfaceChange, Interface::*},
ui::{fonts::Fonts, img_ids, ImageFrame, Tooltip, TooltipManager, Tooltipable}, ui::{fonts::Fonts, img_ids, ImageFrame, Tooltip, TooltipManager, Tooltipable},
GlobalState, GlobalState,
@ -17,6 +16,7 @@ use conrod_core::{
widget::{self, Button, Image, Rectangle, Text}, widget::{self, Button, Image, Rectangle, Text},
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use i18n::Localization;
use specs::{saveload::MarkerAllocator, WorldExt}; use specs::{saveload::MarkerAllocator, WorldExt};
use vek::*; use vek::*;

View File

@ -55,7 +55,6 @@ use crate::{
ecs::{comp as vcomp, comp::HpFloaterList}, ecs::{comp as vcomp, comp::HpFloaterList},
game_input::GameInput, game_input::GameInput,
hud::{img_ids::ImgsRot, prompt_dialog::DialogOutcomeEvent}, hud::{img_ids::ImgsRot, prompt_dialog::DialogOutcomeEvent},
i18n::Localization,
render::UiDrawer, render::UiDrawer,
scene::camera::{self, Camera}, scene::camera::{self, Camera},
session::{ session::{
@ -100,6 +99,7 @@ use conrod_core::{
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget,
}; };
use hashbrown::{HashMap, HashSet}; use hashbrown::{HashMap, HashSet};
use i18n::Localization;
use rand::Rng; use rand::Rng;
use specs::{Entity as EcsEntity, Join, WorldExt}; use specs::{Entity as EcsEntity, Join, WorldExt};
use std::{ use std::{

View File

@ -5,7 +5,6 @@ use super::{
}; };
use crate::{ use crate::{
hud::{get_buff_image, get_buff_info}, hud::{get_buff_image, get_buff_info},
i18n::Localization,
settings::InterfaceSettings, settings::InterfaceSettings,
ui::{fonts::Fonts, Ingameable}, ui::{fonts::Fonts, Ingameable},
}; };
@ -16,6 +15,7 @@ use conrod_core::{
widget::{self, Image, Rectangle, Text}, widget::{self, Image, Rectangle, Text},
widget_ids, Color, Colorable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Color, Colorable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use i18n::Localization;
const MAX_BUBBLE_WIDTH: f64 = 250.0; const MAX_BUBBLE_WIDTH: f64 = 250.0;
widget_ids! { widget_ids! {

View File

@ -1,6 +1,5 @@
use crate::{ use crate::{
game_input::GameInput, game_input::GameInput,
i18n::Localization,
settings::ControlSettings, settings::ControlSettings,
ui::{fonts::Fonts, Ingameable}, ui::{fonts::Fonts, Ingameable},
}; };
@ -9,6 +8,7 @@ use conrod_core::{
widget::{self, RoundedRectangle, Text}, widget::{self, RoundedRectangle, Text},
widget_ids, Color, Colorable, Positionable, Widget, WidgetCommon, widget_ids, Color, Colorable, Positionable, Widget, WidgetCommon,
}; };
use i18n::Localization;
use std::borrow::Cow; use std::borrow::Cow;
use keyboard_keynames::key_layout::KeyLayout; use keyboard_keynames::key_layout::KeyLayout;

View File

@ -1,11 +1,12 @@
use super::Show; use super::Show;
use crate::{i18n::Localization, ui::fonts::Fonts}; use crate::ui::fonts::Fonts;
use client::{self, Client}; use client::{self, Client};
use common_net::msg::Notification; use common_net::msg::Notification;
use conrod_core::{ use conrod_core::{
widget::{self, Text}, widget::{self, Text},
widget_ids, Color, Colorable, Positionable, Widget, WidgetCommon, widget_ids, Color, Colorable, Positionable, Widget, WidgetCommon,
}; };
use i18n::Localization;
use std::{collections::VecDeque, time::Instant}; use std::{collections::VecDeque, time::Instant};
widget_ids! { widget_ids! {

View File

@ -2,7 +2,6 @@ use super::{img_ids::Imgs, TEXT_COLOR, UI_HIGHLIGHT_0};
use crate::{ use crate::{
game_input::GameInput, game_input::GameInput,
hud::{Event, PromptDialogSettings}, hud::{Event, PromptDialogSettings},
i18n::LocalizationHandle,
settings::Settings, settings::Settings,
ui::fonts::Fonts, ui::fonts::Fonts,
}; };
@ -10,6 +9,7 @@ use conrod_core::{
widget::{self, Button, Image, Text}, widget::{self, Button, Image, Text},
widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use i18n::LocalizationHandle;
use keyboard_keynames::key_layout::KeyLayout; use keyboard_keynames::key_layout::KeyLayout;
widget_ids! { widget_ids! {

View File

@ -2,7 +2,6 @@ use super::{RESET_BUTTONS_HEIGHT, RESET_BUTTONS_WIDTH};
use crate::{ use crate::{
hud::{img_ids::Imgs, ChatTab, Show, TEXT_COLOR, TEXT_GRAY_COLOR, UI_HIGHLIGHT_0, UI_MAIN}, hud::{img_ids::Imgs, ChatTab, Show, TEXT_COLOR, TEXT_GRAY_COLOR, UI_HIGHLIGHT_0, UI_MAIN},
i18n::Localization,
session::settings_change::{Chat as ChatChange, Chat::*}, session::settings_change::{Chat as ChatChange, Chat::*},
settings::chat::MAX_CHAT_TABS, settings::chat::MAX_CHAT_TABS,
ui::{fonts::Fonts, ImageSlider, ToggleButton}, ui::{fonts::Fonts, ImageSlider, ToggleButton},
@ -14,6 +13,7 @@ use conrod_core::{
widget::{self, Button, DropDownList, Image, Rectangle, Text, TextEdit}, widget::{self, Button, DropDownList, Image, Rectangle, Text, TextEdit},
widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use i18n::Localization;
use std::cmp::Ordering; use std::cmp::Ordering;
widget_ids! { widget_ids! {

View File

@ -3,7 +3,6 @@ use super::{RESET_BUTTONS_HEIGHT, RESET_BUTTONS_WIDTH};
use crate::{ use crate::{
game_input::GameInput, game_input::GameInput,
hud::{img_ids::Imgs, ERROR_COLOR, TEXT_BIND_CONFLICT_COLOR, TEXT_COLOR}, hud::{img_ids::Imgs, ERROR_COLOR, TEXT_BIND_CONFLICT_COLOR, TEXT_COLOR},
i18n::Localization,
session::settings_change::{Control as ControlChange, Control::*}, session::settings_change::{Control as ControlChange, Control::*},
ui::fonts::Fonts, ui::fonts::Fonts,
GlobalState, GlobalState,
@ -14,6 +13,7 @@ use conrod_core::{
widget::{self, Button, Rectangle, Scrollbar, Text}, widget::{self, Button, Rectangle, Scrollbar, Text},
widget_ids, Borderable, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Borderable, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use i18n::Localization;
use strum::IntoEnumIterator; use strum::IntoEnumIterator;
widget_ids! { widget_ids! {

View File

@ -2,7 +2,6 @@ use super::{RESET_BUTTONS_HEIGHT, RESET_BUTTONS_WIDTH};
use crate::{ use crate::{
hud::{img_ids::Imgs, PressBehavior, MENU_BG, TEXT_COLOR}, hud::{img_ids::Imgs, PressBehavior, MENU_BG, TEXT_COLOR},
i18n::Localization,
session::settings_change::{Gameplay as GameplayChange, Gameplay::*}, session::settings_change::{Gameplay as GameplayChange, Gameplay::*},
ui::{fonts::Fonts, ImageSlider, ToggleButton}, ui::{fonts::Fonts, ImageSlider, ToggleButton},
GlobalState, GlobalState,
@ -13,6 +12,7 @@ use conrod_core::{
widget::{self, Button, DropDownList, Rectangle, Scrollbar, Text}, widget::{self, Button, DropDownList, Rectangle, Scrollbar, Text},
widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use i18n::Localization;
widget_ids! { widget_ids! {
struct Ids { struct Ids {

View File

@ -4,7 +4,6 @@ use crate::{
hud::{ hud::{
img_ids::Imgs, BarNumbers, BuffPosition, CrosshairType, ShortcutNumbers, Show, TEXT_COLOR, img_ids::Imgs, BarNumbers, BuffPosition, CrosshairType, ShortcutNumbers, Show, TEXT_COLOR,
}, },
i18n::Localization,
session::settings_change::{Interface as InterfaceChange, Interface::*}, session::settings_change::{Interface as InterfaceChange, Interface::*},
ui::{fonts::Fonts, ImageSlider, ScaleMode, ToggleButton}, ui::{fonts::Fonts, ImageSlider, ScaleMode, ToggleButton},
GlobalState, GlobalState,
@ -15,6 +14,7 @@ use conrod_core::{
widget::{self, Button, Image, Rectangle, Scrollbar, Text}, widget::{self, Button, Image, Rectangle, Scrollbar, Text},
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use i18n::Localization;
widget_ids! { widget_ids! {
struct Ids{ struct Ids{

View File

@ -1,6 +1,5 @@
use crate::{ use crate::{
hud::{img_ids::Imgs, TEXT_COLOR}, hud::{img_ids::Imgs, TEXT_COLOR},
i18n::{list_localizations, Localization},
session::settings_change::{Language as LanguageChange, Language::*}, session::settings_change::{Language as LanguageChange, Language::*},
ui::{fonts::Fonts, ToggleButton}, ui::{fonts::Fonts, ToggleButton},
GlobalState, GlobalState,
@ -10,6 +9,7 @@ use conrod_core::{
widget::{self, Button, Rectangle, Scrollbar, Text}, widget::{self, Button, Rectangle, Scrollbar, Text},
widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use i18n::{list_localizations, Localization};
widget_ids! { widget_ids! {
struct Ids { struct Ids {

View File

@ -8,7 +8,6 @@ mod video;
use crate::{ use crate::{
hud::{img_ids::Imgs, Show, TEXT_COLOR, UI_HIGHLIGHT_0, UI_MAIN}, hud::{img_ids::Imgs, Show, TEXT_COLOR, UI_HIGHLIGHT_0, UI_MAIN},
i18n::Localization,
session::settings_change::SettingsChange, session::settings_change::SettingsChange,
ui::fonts::Fonts, ui::fonts::Fonts,
GlobalState, GlobalState,
@ -18,6 +17,7 @@ use conrod_core::{
widget::{self, Button, Image, Rectangle, Text}, widget::{self, Button, Image, Rectangle, Text},
widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use i18n::Localization;
use strum::IntoEnumIterator; use strum::IntoEnumIterator;
use strum_macros::EnumIter; use strum_macros::EnumIter;

View File

@ -2,7 +2,6 @@ use super::{RESET_BUTTONS_HEIGHT, RESET_BUTTONS_WIDTH};
use crate::{ use crate::{
hud::{img_ids::Imgs, TEXT_COLOR}, hud::{img_ids::Imgs, TEXT_COLOR},
i18n::Localization,
session::settings_change::{Audio as AudioChange, Audio::*}, session::settings_change::{Audio as AudioChange, Audio::*},
ui::{fonts::Fonts, ImageSlider}, ui::{fonts::Fonts, ImageSlider},
GlobalState, GlobalState,
@ -13,6 +12,7 @@ use conrod_core::{
widget::{self, Button, Rectangle, Scrollbar, Text}, widget::{self, Button, Rectangle, Scrollbar, Text},
widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use i18n::Localization;
widget_ids! { widget_ids! {
struct Ids { struct Ids {

View File

@ -5,7 +5,6 @@ use crate::{
img_ids::Imgs, CRITICAL_HP_COLOR, HP_COLOR, LOW_HP_COLOR, MENU_BG, STAMINA_COLOR, img_ids::Imgs, CRITICAL_HP_COLOR, HP_COLOR, LOW_HP_COLOR, MENU_BG, STAMINA_COLOR,
TEXT_COLOR, TEXT_COLOR,
}, },
i18n::Localization,
render::{ render::{
AaMode, CloudMode, FluidMode, LightingMode, PresentMode, RenderMode, ShadowMapMode, AaMode, CloudMode, FluidMode, LightingMode, PresentMode, RenderMode, ShadowMapMode,
ShadowMode, UpscaleMode, ShadowMode, UpscaleMode,
@ -23,6 +22,7 @@ use conrod_core::{
widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use core::convert::TryFrom; use core::convert::TryFrom;
use i18n::Localization;
use itertools::Itertools; use itertools::Itertools;
use std::iter::once; use std::iter::once;

View File

@ -8,7 +8,6 @@ use super::{
use crate::{ use crate::{
game_input::GameInput, game_input::GameInput,
hud::{ComboFloater, Position, PositionSpecifier}, hud::{ComboFloater, Position, PositionSpecifier},
i18n::Localization,
ui::{ ui::{
fonts::Fonts, fonts::Fonts,
slot::{ContentSize, SlotMaker}, slot::{ContentSize, SlotMaker},
@ -17,6 +16,7 @@ use crate::{
}, },
GlobalState, GlobalState,
}; };
use i18n::Localization;
use client::{self, Client}; use client::{self, Client};
use common::comp::{ use common::comp::{

View File

@ -2,11 +2,7 @@ use super::{
img_ids::{Imgs, ImgsRot}, img_ids::{Imgs, ImgsRot},
Show, TEXT_COLOR, TEXT_COLOR_3, UI_HIGHLIGHT_0, UI_MAIN, Show, TEXT_COLOR, TEXT_COLOR_3, UI_HIGHLIGHT_0, UI_MAIN,
}; };
use crate::ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable};
use crate::{
i18n::Localization,
ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable},
};
use client::{self, Client}; use client::{self, Client};
use common::{comp::group, uid::Uid}; use common::{comp::group, uid::Uid};
use conrod_core::{ use conrod_core::{
@ -14,6 +10,7 @@ use conrod_core::{
widget::{self, Button, Image, Rectangle, Scrollbar, Text, TextEdit}, widget::{self, Button, Image, Rectangle, Scrollbar, Text, TextEdit},
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon, widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
}; };
use i18n::Localization;
use itertools::Itertools; use itertools::Itertools;
use std::time::Instant; use std::time::Instant;

View File

@ -6,7 +6,6 @@ use super::{
}; };
use crate::{ use crate::{
hud::bag::{BackgroundIds, InventoryScroller}, hud::bag::{BackgroundIds, InventoryScroller},
i18n::Localization,
ui::{ ui::{
fonts::Fonts, fonts::Fonts,
slot::{ContentSize, SlotMaker}, slot::{ContentSize, SlotMaker},
@ -28,6 +27,7 @@ use conrod_core::{
widget::{self, Button, Image, Rectangle, State as ConrodState, Text}, widget::{self, Button, Image, Rectangle, State as ConrodState, Text},
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, UiCell, Widget, WidgetCommon, widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, UiCell, Widget, WidgetCommon,
}; };
use i18n::Localization;
use specs::Entity as EcsEntity; use specs::Entity as EcsEntity;
use vek::*; use vek::*;

View File

@ -11,10 +11,9 @@ use common::{
effect::Effect, effect::Effect,
trade::{Good, SitePrices}, trade::{Good, SitePrices},
}; };
use i18n::Localization;
use std::{borrow::Cow, fmt::Write}; use std::{borrow::Cow, fmt::Write};
use crate::i18n::Localization;
pub fn price_desc( pub fn price_desc(
prices: &Option<SitePrices>, prices: &Option<SitePrices>,
item_definition_id: &str, item_definition_id: &str,

View File

@ -33,10 +33,6 @@ pub mod settings;
pub mod singleplayer; pub mod singleplayer;
pub mod window; pub mod window;
// Reexports
pub use crate::error::Error;
pub use i18n;
#[cfg(feature = "singleplayer")] #[cfg(feature = "singleplayer")]
use crate::singleplayer::Singleplayer; use crate::singleplayer::Singleplayer;
#[cfg(feature = "egui-ui")] #[cfg(feature = "egui-ui")]

View File

@ -2,9 +2,9 @@
#![feature(bool_to_option)] #![feature(bool_to_option)]
#![recursion_limit = "2048"] #![recursion_limit = "2048"]
use i18n::{self, LocalizationHandle};
use veloren_voxygen::{ use veloren_voxygen::{
audio::AudioFrontend, audio::AudioFrontend,
i18n::{self, LocalizationHandle},
profile::Profile, profile::Profile,
run, run,
scene::terrain::SpriteRenderContext, scene::terrain::SpriteRenderContext,

View File

@ -1,5 +1,4 @@
use crate::{ use crate::{
i18n::{Localization, LocalizationHandle},
render::UiDrawer, render::UiDrawer,
ui::{ ui::{
self, self,
@ -26,6 +25,7 @@ use common::{
comp::{self, humanoid, inventory::slot::EquipSlot, Inventory, Item}, comp::{self, humanoid, inventory::slot::EquipSlot, Inventory, Item},
LoadoutBuilder, LoadoutBuilder,
}; };
use i18n::{Localization, LocalizationHandle};
//ImageFrame, Tooltip, //ImageFrame, Tooltip,
use crate::settings::Settings; use crate::settings::Settings;
//use std::time::Duration; //use std::time::Duration;

View File

@ -6,7 +6,6 @@ use super::char_selection::CharSelectionState;
#[cfg(feature = "singleplayer")] #[cfg(feature = "singleplayer")]
use crate::singleplayer::Singleplayer; use crate::singleplayer::Singleplayer;
use crate::{ use crate::{
i18n::LocalizationHandle,
render::{Drawer, GlobalsBindGroup}, render::{Drawer, GlobalsBindGroup},
settings::Settings, settings::Settings,
window::Event, window::Event,
@ -20,6 +19,7 @@ use client::{
use client_init::{ClientInit, Error as InitError, Msg as InitMsg}; use client_init::{ClientInit, Error as InitError, Msg as InitMsg};
use common::comp; use common::comp;
use common_base::span; use common_base::span;
use i18n::LocalizationHandle;
use scene::Scene; use scene::Scene;
use std::sync::Arc; use std::sync::Arc;
use tokio::runtime; use tokio::runtime;

View File

@ -1,13 +1,12 @@
use super::{ConnectionState, Imgs, Message}; use super::{ConnectionState, Imgs, Message};
use crate::{
i18n::Localization, use crate::ui::{
ui::{
fonts::IcedFonts as Fonts, fonts::IcedFonts as Fonts,
ice::{component::neat_button, style, widget::Image, Element, IcedUi as Ui, Id}, ice::{component::neat_button, style, widget::Image, Element, IcedUi as Ui, Id},
Graphic, Graphic,
},
}; };
use common::assets::{self, AssetExt}; use common::assets::{self, AssetExt};
use i18n::Localization;
use iced::{button, Align, Column, Container, Length, Row, Space, Text}; use iced::{button, Align, Column, Container, Length, Row, Space, Text};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};

View File

@ -1,6 +1,6 @@
use super::Message; use super::Message;
use i18n::{Localization};
use crate::{ use crate::{
i18n::Localization,
ui::{ ui::{
fonts::IcedFonts as Fonts, fonts::IcedFonts as Fonts,
ice::{component::neat_button, style, Element}, ice::{component::neat_button, style, Element},

View File

@ -1,7 +1,5 @@
use super::{Imgs, LoginInfo, Message, FILL_FRAC_ONE, FILL_FRAC_TWO}; use super::{Imgs, LoginInfo, Message, FILL_FRAC_ONE, FILL_FRAC_TWO};
use crate::{ use crate::ui::{
i18n::Localization,
ui::{
fonts::IcedFonts as Fonts, fonts::IcedFonts as Fonts,
ice::{ ice::{
component::neat_button, component::neat_button,
@ -12,8 +10,8 @@ use crate::{
}, },
Element, Element,
}, },
},
}; };
use i18n::{LanguageMetadata, Localization};
use iced::{ use iced::{
button, scrollable, text_input, Align, Button, Column, Container, Length, Row, Scrollable, button, scrollable, text_input, Align, Button, Column, Container, Length, Row, Scrollable,
Space, Text, TextInput, Space, Text, TextInput,
@ -61,7 +59,7 @@ impl Screen {
i18n: &Localization, i18n: &Localization,
is_selecting_language: bool, is_selecting_language: bool,
selected_language_index: Option<usize>, selected_language_index: Option<usize>,
language_metadatas: &[crate::i18n::LanguageMetadata], language_metadatas: &[LanguageMetadata],
button_style: style::button::Style, button_style: style::button::Style,
version: &str, version: &str,
) -> Element<Message> { ) -> Element<Message> {
@ -223,7 +221,7 @@ impl LanguageSelectBanner {
fonts: &Fonts, fonts: &Fonts,
imgs: &Imgs, imgs: &Imgs,
i18n: &Localization, i18n: &Localization,
language_metadatas: &[crate::i18n::LanguageMetadata], language_metadatas: &[LanguageMetadata],
selected_language_index: Option<usize>, selected_language_index: Option<usize>,
button_style: style::button::Style, button_style: style::button::Style,
) -> Element<Message> { ) -> Element<Message> {

View File

@ -5,7 +5,6 @@ mod login;
mod servers; mod servers;
use crate::{ use crate::{
i18n::{LanguageMetadata, LocalizationHandle},
render::UiDrawer, render::UiDrawer,
ui::{ ui::{
self, self,
@ -16,6 +15,7 @@ use crate::{
}, },
window, GlobalState, window, GlobalState,
}; };
use i18n::{LanguageMetadata, LocalizationHandle};
use iced::{text_input, Column, Container, HorizontalAlignment, Length, Row, Space}; use iced::{text_input, Column, Container, HorizontalAlignment, Length, Row, Space};
//ImageFrame, Tooltip, //ImageFrame, Tooltip,
use crate::settings::Settings; use crate::settings::Settings;
@ -193,7 +193,7 @@ impl Controls {
.iter() .iter()
.position(|f| f == &login_info.server); .position(|f| f == &login_info.server);
let language_metadatas = crate::i18n::list_localizations(); let language_metadatas = i18n::list_localizations();
let selected_language_index = language_metadatas let selected_language_index = language_metadatas
.iter() .iter()
.position(|f| f.language_identifier == settings.language.selected_language); .position(|f| f.language_identifier == settings.language.selected_language);
@ -256,7 +256,7 @@ impl Controls {
self.imgs.bg self.imgs.bg
}; };
let language_metadatas = crate::i18n::list_localizations(); let language_metadatas = i18n::list_localizations();
// TODO: make any large text blocks scrollable so that if the area is to // TODO: make any large text blocks scrollable so that if the area is to
// small they can still be read // small they can still be read
@ -315,7 +315,7 @@ impl Controls {
ui: &mut Ui, ui: &mut Ui,
) { ) {
let servers = &settings.networking.servers; let servers = &settings.networking.servers;
let mut language_metadatas = crate::i18n::list_localizations(); let mut language_metadatas = i18n::list_localizations();
match message { match message {
Message::Quit => events.push(Event::Quit), Message::Quit => events.push(Event::Quit),
@ -509,7 +509,7 @@ impl MainMenuUi {
self.ui.clear_fonts(font); self.ui.clear_fonts(font);
self.controls.fonts = self.controls.fonts =
Fonts::load(i18n.fonts(), &mut self.ui).expect("Impossible to load fonts!"); Fonts::load(i18n.fonts(), &mut self.ui).expect("Impossible to load fonts!");
let language_metadatas = crate::i18n::list_localizations(); let language_metadatas = i18n::list_localizations();
self.controls.selected_language_index = language_metadatas self.controls.selected_language_index = language_metadatas
.iter() .iter()
.position(|f| f.language_identifier == settings.language.selected_language); .position(|f| f.language_identifier == settings.language.selected_language);

View File

@ -1,11 +1,9 @@
use super::{Imgs, Message, FILL_FRAC_ONE}; use super::{Imgs, Message, FILL_FRAC_ONE};
use crate::{ use crate::ui::{
i18n::Localization,
ui::{
fonts::IcedFonts as Fonts, fonts::IcedFonts as Fonts,
ice::{component::neat_button, style, Element}, ice::{component::neat_button, style, Element},
},
}; };
use i18n::Localization;
use iced::{ use iced::{
button, scrollable, Align, Button, Column, Container, Length, Row, Scrollable, Space, Text, button, scrollable, Align, Button, Column, Container, Length, Row, Scrollable, Space, Text,
}; };

View File

@ -35,6 +35,7 @@ use common_net::{
use crate::{ use crate::{
audio::sfx::SfxEvent, audio::sfx::SfxEvent,
error::Error,
game_input::GameInput, game_input::GameInput,
hud::{DebugInfo, Event as HudEvent, Hud, HudInfo, LootMessage, PromptDialogSettings}, hud::{DebugInfo, Event as HudEvent, Hud, HudInfo, LootMessage, PromptDialogSettings},
key_state::KeyState, key_state::KeyState,
@ -43,7 +44,7 @@ use crate::{
scene::{camera, terrain::Interaction, CameraMode, DebugShapeId, Scene, SceneData}, scene::{camera, terrain::Interaction, CameraMode, DebugShapeId, Scene, SceneData},
settings::Settings, settings::Settings,
window::{AnalogGameInput, Event}, window::{AnalogGameInput, Event},
Direction, Error, GlobalState, PlayState, PlayStateResult, Direction, GlobalState, PlayState, PlayStateResult,
}; };
use hashbrown::HashMap; use hashbrown::HashMap;
use settings_change::Language::ChangeLanguage; use settings_change::Language::ChangeLanguage;

View File

@ -6,7 +6,6 @@ use crate::{
BarNumbers, BuffPosition, ChatTab, CrosshairType, Intro, PressBehavior, ScaleChange, BarNumbers, BuffPosition, ChatTab, CrosshairType, Intro, PressBehavior, ScaleChange,
ShortcutNumbers, XpBar, ShortcutNumbers, XpBar,
}, },
i18n::{LanguageMetadata, LocalizationHandle},
render::RenderMode, render::RenderMode,
settings::{ settings::{
AudioSettings, ChatSettings, ControlSettings, Fps, GamepadSettings, GameplaySettings, AudioSettings, ChatSettings, ControlSettings, Fps, GamepadSettings, GameplaySettings,
@ -15,6 +14,7 @@ use crate::{
window::FullScreenSettings, window::FullScreenSettings,
GlobalState, GlobalState,
}; };
use i18n::{LanguageMetadata, LocalizationHandle};
use vek::*; use vek::*;
#[derive(Clone)] #[derive(Clone)]

View File

@ -1,4 +1,3 @@
use crate::i18n;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Serialize, Deserialize)] #[derive(Clone, Debug, Serialize, Deserialize)]

View File

@ -1,7 +1,7 @@
use super::graphic::{Graphic, GraphicCache, Id as GraphicId}; use super::graphic::{Graphic, GraphicCache, Id as GraphicId};
use crate::{ use crate::{
error::Error,
render::{Mesh, Renderer, Texture, UiTextureBindGroup, UiVertex}, render::{Mesh, Renderer, Texture, UiTextureBindGroup, UiVertex},
Error,
}; };
use conrod_core::{text::GlyphCache, widget::Id}; use conrod_core::{text::GlyphCache, widget::Id};
use hashbrown::HashMap; use hashbrown::HashMap;

View File

@ -1,4 +1,4 @@
use crate::{i18n, ui::ice::RawFont}; use crate::ui::ice::RawFont;
use common::assets::{self, AssetExt}; use common::assets::{self, AssetExt};
pub struct Font { pub struct Font {

View File

@ -1,7 +1,7 @@
use super::graphic::{Graphic, GraphicCache, Id as GraphicId}; use super::graphic::{Graphic, GraphicCache, Id as GraphicId};
use crate::{ use crate::{
error::Error,
render::{Renderer, Texture, UiTextureBindGroup}, render::{Renderer, Texture, UiTextureBindGroup},
Error,
}; };
use common::assets::{self, AssetExt}; use common::assets::{self, AssetExt};
use glyph_brush::GlyphBrushBuilder; use glyph_brush::GlyphBrushBuilder;

View File

@ -15,9 +15,9 @@ use super::{
scale::{Scale, ScaleMode}, scale::{Scale, ScaleMode},
}; };
use crate::{ use crate::{
error::Error,
render::{Renderer, UiDrawer}, render::{Renderer, UiDrawer},
window::Window, window::Window,
Error,
}; };
use common::slowjob::SlowJobPool; use common::slowjob::SlowJobPool;
use common_base::span; use common_base::span;

View File

@ -14,11 +14,11 @@ use super::{
Font, FontId, RawFont, Rotation, Font, FontId, RawFont, Rotation,
}; };
use crate::{ use crate::{
error::Error,
render::{ render::{
create_ui_quad, create_ui_quad_vert_gradient, DynamicModel, Mesh, Renderer, UiBoundLocals, create_ui_quad, create_ui_quad_vert_gradient, DynamicModel, Mesh, Renderer, UiBoundLocals,
UiDrawer, UiLocals, UiMode, UiVertex, UiDrawer, UiLocals, UiMode, UiVertex,
}, },
Error,
}; };
use common::{slowjob::SlowJobPool, util::srgba_to_linear}; use common::{slowjob::SlowJobPool, util::srgba_to_linear};
use common_base::span; use common_base::span;

View File

@ -28,12 +28,12 @@ pub use widgets::{
}; };
use crate::{ use crate::{
error::Error,
render::{ render::{
create_ui_quad, create_ui_tri, DynamicModel, Mesh, RenderError, Renderer, UiBoundLocals, create_ui_quad, create_ui_tri, DynamicModel, Mesh, RenderError, Renderer, UiBoundLocals,
UiDrawer, UiLocals, UiMode, UiVertex, UiDrawer, UiLocals, UiMode, UiVertex,
}, },
window::Window, window::Window,
Error,
}; };
#[rustfmt::skip] #[rustfmt::skip]
use ::image::GenericImageView; use ::image::GenericImageView;

View File

@ -1,12 +1,9 @@
use super::image_frame::ImageFrame; use super::image_frame::ImageFrame;
use crate::{ use crate::hud::{
hud::{
get_quality_col, get_quality_col,
img_ids::Imgs, img_ids::Imgs,
item_imgs::{animate_by_pulse, ItemImgs, ItemKey}, item_imgs::{animate_by_pulse, ItemImgs, ItemKey},
util, util,
},
i18n::Localization,
}; };
use client::Client; use client::Client;
use common::{ use common::{
@ -22,6 +19,7 @@ use conrod_core::{
widget, widget_ids, Color, Colorable, FontSize, Positionable, Scalar, Sizeable, Ui, UiCell, widget, widget_ids, Color, Colorable, FontSize, Positionable, Scalar, Sizeable, Ui, UiCell,
Widget, WidgetCommon, WidgetStyle, Widget, WidgetCommon, WidgetStyle,
}; };
use i18n::Localization;
use lazy_static::lazy_static; use lazy_static::lazy_static;
use std::time::{Duration, Instant}; use std::time::{Duration, Instant};

View File

@ -1,9 +1,10 @@
use crate::{ use crate::{
controller::*, controller::*,
error::Error,
game_input::GameInput, game_input::GameInput,
render::Renderer, render::Renderer,
settings::{ControlSettings, Settings}, settings::{ControlSettings, Settings},
ui, Error, ui,
}; };
use common_base::span; use common_base::span;
use crossbeam_channel as channel; use crossbeam_channel as channel;