You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Use const_format for const strings
This commit is contained in:
@@ -2,10 +2,10 @@ use std::cmp::min;
|
||||
use std::ffi::{CStr, FromBytesWithNulError, OsStr};
|
||||
use std::fmt::{Arguments, Debug, Display, Formatter, Write};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::os::unix::ffi::OsStrExt;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::str::{Utf8Chunks, Utf8Error};
|
||||
use std::{fmt, mem, slice, str};
|
||||
use std::os::unix::ffi::OsStrExt;
|
||||
|
||||
use cxx::{type_id, ExternType};
|
||||
use libc::c_char;
|
||||
@@ -664,6 +664,6 @@ macro_rules! cstr {
|
||||
#[macro_export]
|
||||
macro_rules! raw_cstr {
|
||||
($($str:tt)*) => {{
|
||||
cstr!($($str)*).as_ptr()
|
||||
$crate::cstr!($($str)*).as_ptr()
|
||||
}};
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ use libc::{
|
||||
};
|
||||
|
||||
use crate::cxx_extern::readlinkat_for_cxx;
|
||||
use crate::{cstr, errno, raw_cstr, CxxResultExt, FsPath, Utf8CStr, Utf8CStrBufRef};
|
||||
use crate::{errno, raw_cstr, CxxResultExt, FsPath, Utf8CStr, Utf8CStrBufRef};
|
||||
|
||||
fn ptr_to_str<'a, T>(ptr: *const T) -> &'a str {
|
||||
if ptr.is_null() {
|
||||
|
||||
Reference in New Issue
Block a user