From 0233c8c63b9a05535eeea7f233be930e22b84804 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 20 Jun 2024 10:34:40 +0200 Subject: [PATCH] router: repalce c_str! with c"literals" we can now drop the proxmox-lang dependency here Signed-off-by: Wolfgang Bumiller --- proxmox-router/Cargo.toml | 1 - proxmox-router/src/cli/text_table.rs | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/proxmox-router/Cargo.toml b/proxmox-router/Cargo.toml index e064c815..346f13b7 100644 --- a/proxmox-router/Cargo.toml +++ b/proxmox-router/Cargo.toml @@ -26,7 +26,6 @@ tokio = { workspace = true, features = [], optional = true } rustyline = { version = "9", optional = true } libc = { workspace = true, optional = true } -proxmox-lang.workspace = true proxmox-http-error.workspace = true proxmox-schema.workspace = true proxmox-async.workspace = true diff --git a/proxmox-router/src/cli/text_table.rs b/proxmox-router/src/cli/text_table.rs index 21e466cd..1b47ccc2 100644 --- a/proxmox-router/src/cli/text_table.rs +++ b/proxmox-router/src/cli/text_table.rs @@ -4,7 +4,6 @@ use anyhow::{bail, format_err, Error}; use serde_json::Value; use unicode_width::UnicodeWidthStr; -use proxmox_lang::c_str; use proxmox_schema::{ObjectSchemaType, OneOfSchema, Schema, SchemaPropertyEntry}; /// allows to configure the default output fromat using environment vars @@ -254,7 +253,7 @@ impl TableFormatOptions { } } - let empty_cstr = c_str!(""); + let empty_cstr = c""; use std::ffi::CStr; let encoding = unsafe { @@ -262,7 +261,7 @@ impl TableFormatOptions { CStr::from_ptr(libc::nl_langinfo(libc::CODESET)) }; - if encoding != c_str!("UTF-8") { + if encoding != c"UTF-8" { me.ascii_delimiters = true; }