我正在docker使用命令构建图像
docker-compose -f "docker-compose.yml" up -d --build
Run Code Online (Sandbox Code Playgroud)
但它返回一个错误
ERROR: 2 matches found based on name: network officeconverter_default is ambiguous
这有点清楚,在我的机器上有两个同名的网络试图存在。
问题是如何从 docker 网络中删除网络
PS E:\repos\Github\officeconverter> docker network ls 网络 ID 名称驱动程序范围 868c88a83bd6桥桥本地 92f7d20ed432 officeconverter_default 桥接本地 3f96cfb7b591 officeconverter_default 桥接本地
升级我的 docker 桌面后,我在运行 docker-compose up 时遇到此错误。我通常的设置包括由 docker-compose 命令控制的微服务,当我运行 docker-compose up 时,所有容器都将启动。更新我的 docker 桌面后,我得到:
Can't separate key from value
Run Code Online (Sandbox Code Playgroud)
在跑步的时候 docker-compose up
我正在构建一个 Rust 应用程序,并使用Simple Logger来记录我的应用程序的初始化。我的main.rs看起来像这样:
use log::info;
use simple_logger::SimpleLogger;
fn main() {
SimpleLogger::new().init().unwrap();
let (event_loop, mut interface) = create_interface();
info!("Game interface created");
Run Code Online (Sandbox Code Playgroud)
上面的代码出错了:
thread 'main' panicked at 'Could not determine the UTC offset on this system. Possible causes are that the time crate does not implement "local_offset_at" on your system, or that you are running in a multi-threaded environment and the time crate is returning "None" from "local_offset_at" to avoid unsafe behaviour. See the time crate's documentation …Run Code Online (Sandbox Code Playgroud) int我正在尝试获取rust的长度(以十进制解释时的位数) 。我找到了一种方法来做到这一点,但是我正在寻找来自原语本身的方法。这就是我所拥有的:
let num = 90.to_string();
println!("num: {}", num.chars().count())
// num: 2
Run Code Online (Sandbox Code Playgroud)
我正在查看https://docs.rs/digits/0.3.3/digits/struct.Digits.html#method.length。这是一个好的候选人吗?我该如何使用它?或者还有其他板条箱可以为我做这件事吗?
类型转换较少的衬垫是我正在寻找的理想解决方案。