mirror of
https://github.com/chatmail/core.git
synced 2026-04-21 15:36:30 +03:00
Remove useless argument of logging macros
Previously, logging macros (info! warn! error!) accepted integer argument (data1), that was passed to callback function verbatim. In all call sites this argument was 0. With this change, that data1 argument is no longer part of macro interface, 0 is always passed to callback in internals of these macros.
This commit is contained in:
@@ -852,7 +852,7 @@ pub fn dc_delete_file(context: &Context, path: impl AsRef<std::path::Path>) -> b
|
||||
match res {
|
||||
Ok(_) => true,
|
||||
Err(_err) => {
|
||||
warn!(context, 0, "Cannot delete \"{}\".", path.as_ref().display());
|
||||
warn!(context, "Cannot delete \"{}\".", path.as_ref().display());
|
||||
false
|
||||
}
|
||||
}
|
||||
@@ -870,7 +870,6 @@ pub fn dc_copy_file(
|
||||
Err(_) => {
|
||||
error!(
|
||||
context,
|
||||
0,
|
||||
"Cannot copy \"{}\" to \"{}\".",
|
||||
src.as_ref().display(),
|
||||
dest.as_ref().display(),
|
||||
@@ -888,7 +887,6 @@ pub fn dc_create_folder(context: &Context, path: impl AsRef<std::path::Path>) ->
|
||||
Err(_err) => {
|
||||
warn!(
|
||||
context,
|
||||
0,
|
||||
"Cannot create directory \"{}\".",
|
||||
path.as_ref().display(),
|
||||
);
|
||||
@@ -921,7 +919,6 @@ pub fn dc_write_file_safe<P: AsRef<std::path::Path>>(
|
||||
if let Err(_err) = fs::write(&path_abs, buf) {
|
||||
warn!(
|
||||
context,
|
||||
0,
|
||||
"Cannot write {} bytes to \"{}\".",
|
||||
buf.len(),
|
||||
path.as_ref().display(),
|
||||
@@ -959,7 +956,6 @@ pub fn dc_read_file_safe<P: AsRef<std::path::Path>>(context: &Context, path: P)
|
||||
Err(_err) => {
|
||||
warn!(
|
||||
context,
|
||||
0,
|
||||
"Cannot read \"{}\" or file is empty.",
|
||||
path.as_ref().display()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user