mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-11 15:46:53 +00:00
Replace prints with logs and fix grammar (#437)
* refactor: replace print statements with proper logging and fix grammar - Fix English grammar errors in existing log messages - Add tracing imports where needed - Improve log message clarity and consistency - Follow project logging best practices using tracing crate * fix: resolve clippy warnings and format code - Fix unused import warnings by making test imports conditional with #[cfg(test)] - Fix unused variable warning by prefixing with underscore - Run cargo fmt to fix formatting issues - Ensure all code passes clippy checks with -D warnings flag * refactor: move tracing::debug import into test module Move the tracing::debug import from file-level #[cfg(test)] into the test module itself for better code organization and consistency with other test modules * Checkpoint before follow-up message Co-authored-by: anzhengchao <anzhengchao@gmail.com> * refactor: move tracing::debug import into test module in user_agent.rs Complete the refactoring by moving the tracing::debug import from file-level #[cfg(test)] into the test module for consistency across all test files --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
@@ -728,7 +728,7 @@ impl ReplicationPool {
|
|||||||
// Either already satisfied or worker count changed while waiting for the lock.
|
// Either already satisfied or worker count changed while waiting for the lock.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
println!("2 resize_lrg_workers");
|
debug!("Resizing large workers pool");
|
||||||
|
|
||||||
let active_workers = Arc::clone(&self.active_lrg_workers);
|
let active_workers = Arc::clone(&self.active_lrg_workers);
|
||||||
let obj_layer = Arc::clone(&self.obj_layer);
|
let obj_layer = Arc::clone(&self.obj_layer);
|
||||||
@@ -743,7 +743,7 @@ impl ReplicationPool {
|
|||||||
|
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
while let Some(operation) = receiver.recv().await {
|
while let Some(operation) = receiver.recv().await {
|
||||||
println!("resize workers 1");
|
debug!("Processing replication operation in worker");
|
||||||
active_workers_clone.fetch_add(1, Ordering::SeqCst);
|
active_workers_clone.fetch_add(1, Ordering::SeqCst);
|
||||||
|
|
||||||
if let Some(info) = operation.as_any().downcast_ref::<ReplicateObjectInfo>() {
|
if let Some(info) = operation.as_any().downcast_ref::<ReplicateObjectInfo>() {
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ pub fn uvarint(buf: &[u8]) -> (u64, isize) {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use tokio::io::BufReader;
|
use tokio::io::BufReader;
|
||||||
|
use tracing::debug;
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_read_full_exact() {
|
async fn test_read_full_exact() {
|
||||||
@@ -130,7 +131,7 @@ mod tests {
|
|||||||
rev[total - n..total].copy_from_slice(&buf[..n]);
|
rev[total - n..total].copy_from_slice(&buf[..n]);
|
||||||
|
|
||||||
count += 1;
|
count += 1;
|
||||||
println!("count: {count}, total: {total}, n: {n}");
|
debug!("Read progress - count: {}, total: {}, bytes read: {}", count, total, n);
|
||||||
}
|
}
|
||||||
assert_eq!(total, size);
|
assert_eq!(total, size);
|
||||||
|
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ fn read_stat(file_name: &str) -> std::io::Result<Vec<u64>> {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use super::get_drive_stats;
|
use super::get_drive_stats;
|
||||||
|
use tracing::debug;
|
||||||
|
|
||||||
#[ignore] // FIXME: failed in github actions
|
#[ignore] // FIXME: failed in github actions
|
||||||
#[test]
|
#[test]
|
||||||
@@ -177,6 +178,6 @@ mod test {
|
|||||||
let major = 7;
|
let major = 7;
|
||||||
let minor = 11;
|
let minor = 11;
|
||||||
let s = get_drive_stats(major, minor).unwrap();
|
let s = get_drive_stats(major, minor).unwrap();
|
||||||
println!("{s:?}");
|
debug!("Drive stats for major: {}, minor: {} - {:?}", major, minor, s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,8 +74,7 @@ mod tests {
|
|||||||
let temp_dir = tempfile::tempdir().unwrap();
|
let temp_dir = tempfile::tempdir().unwrap();
|
||||||
let info = get_info(temp_dir.path()).unwrap();
|
let info = get_info(temp_dir.path()).unwrap();
|
||||||
|
|
||||||
println!("Disk Info: {info:?}");
|
// Verify disk info is valid
|
||||||
|
|
||||||
assert!(info.total > 0);
|
assert!(info.total > 0);
|
||||||
assert!(info.free > 0);
|
assert!(info.free > 0);
|
||||||
assert!(info.used > 0);
|
assert!(info.used > 0);
|
||||||
@@ -109,10 +108,9 @@ mod tests {
|
|||||||
let path1 = temp_dir1.path().to_str().unwrap();
|
let path1 = temp_dir1.path().to_str().unwrap();
|
||||||
let path2 = temp_dir2.path().to_str().unwrap();
|
let path2 = temp_dir2.path().to_str().unwrap();
|
||||||
|
|
||||||
let result = same_disk(path1, path2).unwrap();
|
let _result = same_disk(path1, path2).unwrap();
|
||||||
// Since both temporary directories are created in the same file system,
|
// Since both temporary directories are created in the same file system,
|
||||||
// they should be on the same disk in most cases
|
// they should be on the same disk in most cases
|
||||||
println!("Path1: {path1}, Path2: {path2}, Same disk: {result}");
|
|
||||||
// Test passes if the function doesn't panic - the actual result depends on test environment
|
// Test passes if the function doesn't panic - the actual result depends on test environment
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -279,9 +279,9 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_base_dir_from_prefix() {
|
fn test_base_dir_from_prefix() {
|
||||||
let a = "da/";
|
let a = "da/";
|
||||||
println!("---- in {a}");
|
// Test base_dir_from_prefix function
|
||||||
let a = base_dir_from_prefix(a);
|
let result = base_dir_from_prefix(a);
|
||||||
println!("---- out {a}");
|
assert!(!result.is_empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -155,12 +155,13 @@ pub fn get_user_agent(service: ServiceType) -> String {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use rustfs_config::VERSION;
|
use rustfs_config::VERSION;
|
||||||
|
use tracing::debug;
|
||||||
#[test]
|
#[test]
|
||||||
fn test_user_agent_format_basis() {
|
fn test_user_agent_format_basis() {
|
||||||
let ua = get_user_agent(ServiceType::Basis);
|
let ua = get_user_agent(ServiceType::Basis);
|
||||||
assert!(ua.starts_with("Mozilla/5.0"));
|
assert!(ua.starts_with("Mozilla/5.0"));
|
||||||
assert!(ua.contains(&format!("RustFS/{VERSION}").to_string()));
|
assert!(ua.contains(&format!("RustFS/{VERSION}").to_string()));
|
||||||
println!("User-Agent: {ua}");
|
debug!("Basic User-Agent: {}", ua);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -168,7 +169,7 @@ mod tests {
|
|||||||
let ua = get_user_agent(ServiceType::Core);
|
let ua = get_user_agent(ServiceType::Core);
|
||||||
assert!(ua.starts_with("Mozilla/5.0"));
|
assert!(ua.starts_with("Mozilla/5.0"));
|
||||||
assert!(ua.contains(&format!("RustFS/{VERSION} (core)").to_string()));
|
assert!(ua.contains(&format!("RustFS/{VERSION} (core)").to_string()));
|
||||||
println!("User-Agent: {ua}");
|
debug!("Core User-Agent: {}", ua);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -176,7 +177,7 @@ mod tests {
|
|||||||
let ua = get_user_agent(ServiceType::Event);
|
let ua = get_user_agent(ServiceType::Event);
|
||||||
assert!(ua.starts_with("Mozilla/5.0"));
|
assert!(ua.starts_with("Mozilla/5.0"));
|
||||||
assert!(ua.contains(&format!("RustFS/{VERSION} (event)").to_string()));
|
assert!(ua.contains(&format!("RustFS/{VERSION} (event)").to_string()));
|
||||||
println!("User-Agent: {ua}");
|
debug!("Event User-Agent: {}", ua);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -184,7 +185,7 @@ mod tests {
|
|||||||
let ua = get_user_agent(ServiceType::Logger);
|
let ua = get_user_agent(ServiceType::Logger);
|
||||||
assert!(ua.starts_with("Mozilla/5.0"));
|
assert!(ua.starts_with("Mozilla/5.0"));
|
||||||
assert!(ua.contains(&format!("RustFS/{VERSION} (logger)").to_string()));
|
assert!(ua.contains(&format!("RustFS/{VERSION} (logger)").to_string()));
|
||||||
println!("User-Agent: {ua}");
|
debug!("Logger User-Agent: {}", ua);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -192,7 +193,7 @@ mod tests {
|
|||||||
let ua = get_user_agent(ServiceType::Custom("monitor".to_string()));
|
let ua = get_user_agent(ServiceType::Custom("monitor".to_string()));
|
||||||
assert!(ua.starts_with("Mozilla/5.0"));
|
assert!(ua.starts_with("Mozilla/5.0"));
|
||||||
assert!(ua.contains(&format!("RustFS/{VERSION} (monitor)").to_string()));
|
assert!(ua.contains(&format!("RustFS/{VERSION} (monitor)").to_string()));
|
||||||
println!("User-Agent: {ua}");
|
debug!("Monitor User-Agent: {}", ua);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -203,9 +204,9 @@ mod tests {
|
|||||||
let ua_logger = get_user_agent(ServiceType::Logger);
|
let ua_logger = get_user_agent(ServiceType::Logger);
|
||||||
let ua_custom = get_user_agent(ServiceType::Custom("monitor".to_string()));
|
let ua_custom = get_user_agent(ServiceType::Custom("monitor".to_string()));
|
||||||
|
|
||||||
println!("Core User-Agent: {ua_core}");
|
debug!("Core User-Agent: {}", ua_core);
|
||||||
println!("Event User-Agent: {ua_event}");
|
debug!("Event User-Agent: {}", ua_event);
|
||||||
println!("Logger User-Agent: {ua_logger}");
|
debug!("Logger User-Agent: {}", ua_logger);
|
||||||
println!("Custom User-Agent: {ua_custom}");
|
debug!("Custom User-Agent: {}", ua_custom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -837,8 +837,8 @@ pub struct SetRemoteTargetHandler {}
|
|||||||
impl Operation for SetRemoteTargetHandler {
|
impl Operation for SetRemoteTargetHandler {
|
||||||
async fn call(&self, mut _req: S3Request<Body>, _params: Params<'_, '_>) -> S3Result<S3Response<(StatusCode, Body)>> {
|
async fn call(&self, mut _req: S3Request<Body>, _params: Params<'_, '_>) -> S3Result<S3Response<(StatusCode, Body)>> {
|
||||||
//return Ok(S3Response::new((StatusCode::OK, Body::from("OK".to_string()))));
|
//return Ok(S3Response::new((StatusCode::OK, Body::from("OK".to_string()))));
|
||||||
// println!("handle MetricsHandler, params: {:?}", _req.input);
|
debug!("Processing SetRemoteTargetHandler request");
|
||||||
info!("SetRemoteTargetHandler params: {:?}", _req.credentials);
|
info!("SetRemoteTargetHandler credentials: {:?}", _req.credentials);
|
||||||
let queries = extract_query_params(&_req.uri);
|
let queries = extract_query_params(&_req.uri);
|
||||||
let Some(_cred) = _req.credentials else {
|
let Some(_cred) = _req.credentials else {
|
||||||
error!("credentials null");
|
error!("credentials null");
|
||||||
@@ -846,9 +846,8 @@ impl Operation for SetRemoteTargetHandler {
|
|||||||
};
|
};
|
||||||
let _is_owner = true; // 先按 true 处理,后期根据请求决定
|
let _is_owner = true; // 先按 true 处理,后期根据请求决定
|
||||||
let body = _req.input.store_all_unlimited().await.unwrap();
|
let body = _req.input.store_all_unlimited().await.unwrap();
|
||||||
//println!("body: {}", std::str::from_utf8(&body.clone()).unwrap());
|
debug!("Request body received, size: {} bytes", body.len());
|
||||||
|
|
||||||
//println!("bucket is:{}", bucket.clone());
|
|
||||||
if let Some(bucket) = queries.get("bucket") {
|
if let Some(bucket) = queries.get("bucket") {
|
||||||
if bucket.is_empty() {
|
if bucket.is_empty() {
|
||||||
info!("have bucket: {}", bucket);
|
info!("have bucket: {}", bucket);
|
||||||
@@ -907,7 +906,7 @@ impl Operation for SetRemoteTargetHandler {
|
|||||||
info!("targets is {}", targets.len());
|
info!("targets is {}", targets.len());
|
||||||
match serde_json::to_vec(&targets) {
|
match serde_json::to_vec(&targets) {
|
||||||
Ok(json) => {
|
Ok(json) => {
|
||||||
//println!("json is:{:?}", json.clone().to_ascii_lowercase());
|
debug!("Serialized targets configuration, size: {} bytes", json.len());
|
||||||
//metadata_sys::GLOBAL_BucketMetadataSys::
|
//metadata_sys::GLOBAL_BucketMetadataSys::
|
||||||
//BUCKET_TARGETS_FILE: &str = "bucket-targets.json"
|
//BUCKET_TARGETS_FILE: &str = "bucket-targets.json"
|
||||||
let _ = metadata_sys::update(bucket, "bucket-targets.json", json).await;
|
let _ = metadata_sys::update(bucket, "bucket-targets.json", json).await;
|
||||||
@@ -1011,7 +1010,7 @@ impl Operation for ListRemoteTargetHandler {
|
|||||||
|
|
||||||
return Ok(S3Response::new((StatusCode::OK, Body::from(json_targets))));
|
return Ok(S3Response::new((StatusCode::OK, Body::from(json_targets))));
|
||||||
} else {
|
} else {
|
||||||
println!("GLOBAL_BUCKET_TARGET_SYS is not initialized");
|
error!("GLOBAL_BUCKET_TARGET_SYS is not initialized");
|
||||||
return Err(S3Error::with_message(
|
return Err(S3Error::with_message(
|
||||||
S3ErrorCode::InternalError,
|
S3ErrorCode::InternalError,
|
||||||
"GLOBAL_BUCKET_TARGET_SYS is not initialized".to_string(),
|
"GLOBAL_BUCKET_TARGET_SYS is not initialized".to_string(),
|
||||||
@@ -1019,7 +1018,7 @@ impl Operation for ListRemoteTargetHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("Bucket parameter missing in request");
|
warn!("Bucket parameter is missing in request");
|
||||||
Ok(S3Response::new((
|
Ok(S3Response::new((
|
||||||
StatusCode::BAD_REQUEST,
|
StatusCode::BAD_REQUEST,
|
||||||
Body::from("Bucket parameter is required".to_string()),
|
Body::from("Bucket parameter is required".to_string()),
|
||||||
@@ -1197,7 +1196,7 @@ mod tests {
|
|||||||
fn test_decode() {
|
fn test_decode() {
|
||||||
let b = b"{\"recursive\":false,\"dryRun\":false,\"remove\":false,\"recreate\":false,\"scanMode\":1,\"updateParity\":false,\"nolock\":false}";
|
let b = b"{\"recursive\":false,\"dryRun\":false,\"remove\":false,\"recreate\":false,\"scanMode\":1,\"updateParity\":false,\"nolock\":false}";
|
||||||
let s: HealOpts = serde_urlencoded::from_bytes(b).unwrap();
|
let s: HealOpts = serde_urlencoded::from_bytes(b).unwrap();
|
||||||
println!("{s:?}");
|
debug!("Parsed HealOpts: {:?}", s);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: Testing the actual async handler implementations requires:
|
// Note: Testing the actual async handler implementations requires:
|
||||||
|
|||||||
@@ -192,8 +192,8 @@ impl FS {
|
|||||||
let f = match entry {
|
let f = match entry {
|
||||||
Ok(f) => f,
|
Ok(f) => f,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
println!("Error reading entry: {e}");
|
error!("Failed to read archive entry: {}", e);
|
||||||
return Err(s3_error!(InvalidArgument, "Error reading entry {:?}", e));
|
return Err(s3_error!(InvalidArgument, "Failed to read archive entry: {:?}", e));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ impl FS {
|
|||||||
|
|
||||||
let mut size = f.header().size().unwrap_or_default() as i64;
|
let mut size = f.header().size().unwrap_or_default() as i64;
|
||||||
|
|
||||||
println!("Extracted: {fpath}, size {size}");
|
debug!("Extracting file: {}, size: {} bytes", fpath, size);
|
||||||
|
|
||||||
let mut reader: Box<dyn Reader> = Box::new(WarpReader::new(f));
|
let mut reader: Box<dyn Reader> = Box::new(WarpReader::new(f));
|
||||||
|
|
||||||
@@ -271,14 +271,14 @@ impl FS {
|
|||||||
// CompressionFormat::from_extension(&ext),
|
// CompressionFormat::from_extension(&ext),
|
||||||
// |entry: tokio_tar::Entry<tokio_tar::Archive<Box<dyn AsyncRead + Send + Unpin + 'static>>>| async move {
|
// |entry: tokio_tar::Entry<tokio_tar::Archive<Box<dyn AsyncRead + Send + Unpin + 'static>>>| async move {
|
||||||
// let path = entry.path().unwrap();
|
// let path = entry.path().unwrap();
|
||||||
// println!("Extracted: {}", path.display());
|
// debug!("Extracted: {}", path.display());
|
||||||
// Ok(())
|
// Ok(())
|
||||||
// },
|
// },
|
||||||
// )
|
// )
|
||||||
// .await
|
// .await
|
||||||
// {
|
// {
|
||||||
// Ok(_) => println!("Decompression successful!"),
|
// Ok(_) => info!("Decompression completed successfully"),
|
||||||
// Err(e) => println!("Decompression failed: {}", e),
|
// Err(e) => error!("Decompression failed: {}", e),
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// TODO: etag
|
// TODO: etag
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ mod tests {
|
|||||||
async fn test_get_current_version() {
|
async fn test_get_current_version() {
|
||||||
let version = get_current_version();
|
let version = get_current_version();
|
||||||
assert!(!version.is_empty());
|
assert!(!version.is_empty());
|
||||||
println!("Current version: {version}");
|
debug!("Current version: {version}");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -213,7 +213,7 @@ mod tests {
|
|||||||
check_time,
|
check_time,
|
||||||
};
|
};
|
||||||
|
|
||||||
println!("result: {:?}", serde_json::to_string(&result).unwrap());
|
debug!("Update check result: {:?}", serde_json::to_string(&result).unwrap());
|
||||||
|
|
||||||
// Test fields
|
// Test fields
|
||||||
assert!(result.update_available);
|
assert!(result.update_available);
|
||||||
@@ -271,7 +271,7 @@ mod tests {
|
|||||||
assert!(!error_result.update_available);
|
assert!(!error_result.update_available);
|
||||||
assert!(error_result.latest_version.is_none());
|
assert!(error_result.latest_version.is_none());
|
||||||
|
|
||||||
println!("✅ UpdateCheckResult tests passed");
|
debug!("UpdateCheckResult tests passed successfully");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -320,7 +320,7 @@ mod tests {
|
|||||||
|
|
||||||
// Test JSON serialization/deserialization
|
// Test JSON serialization/deserialization
|
||||||
let json_string = serde_json::to_string(&version_info).unwrap();
|
let json_string = serde_json::to_string(&version_info).unwrap();
|
||||||
println!("json_string: {json_string}");
|
debug!("Serialized version info: {json_string}");
|
||||||
assert!(json_string.contains("2.0.0"));
|
assert!(json_string.contains("2.0.0"));
|
||||||
assert!(json_string.contains("Major release"));
|
assert!(json_string.contains("Major release"));
|
||||||
|
|
||||||
@@ -328,7 +328,7 @@ mod tests {
|
|||||||
assert_eq!(deserialized.version, version_info.version);
|
assert_eq!(deserialized.version, version_info.version);
|
||||||
assert_eq!(deserialized.release_notes, version_info.release_notes);
|
assert_eq!(deserialized.release_notes, version_info.release_notes);
|
||||||
|
|
||||||
println!("✅ VersionInfo tests passed");
|
debug!("VersionInfo tests passed successfully");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -345,6 +345,6 @@ mod tests {
|
|||||||
assert_eq!(version::parse_version("1.0.0").unwrap(), (1, 0, 0, None));
|
assert_eq!(version::parse_version("1.0.0").unwrap(), (1, 0, 0, None));
|
||||||
assert_eq!(version::parse_version("2.1.3-alpha.1").unwrap(), (2, 1, 3, Some("alpha.1".to_string())));
|
assert_eq!(version::parse_version("2.1.3-alpha.1").unwrap(), (2, 1, 3, Some("alpha.1".to_string())));
|
||||||
|
|
||||||
println!("✅ Version functions integration tests passed");
|
debug!("Version functions integration tests passed successfully");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -205,6 +205,7 @@ fn compare_pre_release(current: &str, latest: &str) -> bool {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use tracing::debug;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_parse_version() {
|
fn test_parse_version() {
|
||||||
@@ -260,7 +261,7 @@ mod tests {
|
|||||||
fn test_current_version_output() {
|
fn test_current_version_output() {
|
||||||
// Display current version output
|
// Display current version output
|
||||||
let version = get_version();
|
let version = get_version();
|
||||||
println!("Current version: {version}");
|
debug!("Current version: {version}");
|
||||||
|
|
||||||
// Verify version format
|
// Verify version format
|
||||||
assert!(version.starts_with("refs/tags/") || version.starts_with("@"));
|
assert!(version.starts_with("refs/tags/") || version.starts_with("@"));
|
||||||
@@ -268,7 +269,7 @@ mod tests {
|
|||||||
// If it's refs/tags/ format, verify version number is not empty
|
// If it's refs/tags/ format, verify version number is not empty
|
||||||
if let Some(version_part) = version.strip_prefix("refs/tags/") {
|
if let Some(version_part) = version.strip_prefix("refs/tags/") {
|
||||||
assert!(!version_part.is_empty());
|
assert!(!version_part.is_empty());
|
||||||
println!("Version part: {version_part}");
|
debug!("Version part: {version_part}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user