Skip to content

Commit 439106d

Browse files
committed
chore: fmt
1 parent ed3e09a commit 439106d

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

rust/cubesql/cubesql/src/compile/error.rs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
use std::{backtrace::Backtrace, collections::HashMap};
2-
use std::fmt::Formatter;
1+
use std::{backtrace::Backtrace, collections::HashMap, fmt::Formatter};
32

43
#[derive(Debug)]
54
pub enum CompilationError {
@@ -12,10 +11,19 @@ pub enum CompilationError {
1211
impl std::fmt::Display for CompilationError {
1312
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
1413
match self {
15-
CompilationError::Internal(message, _, _) => f.write_fmt(format_args!("SQLCompilationError: Internal: {}", message)),
16-
CompilationError::User(message, _) => f.write_fmt(format_args!("SQLCompilationError: User: {}", message)),
17-
CompilationError::Unsupported(message, _) => f.write_fmt(format_args!("SQLCompilationError: Unsupported: {}", message)),
18-
CompilationError::Fatal(message, _) => f.write_fmt(format_args!("SQLCompilationError: Fatal: {}", message))
14+
CompilationError::Internal(message, _, _) => {
15+
f.write_fmt(format_args!("SQLCompilationError: Internal: {}", message))
16+
}
17+
CompilationError::User(message, _) => {
18+
f.write_fmt(format_args!("SQLCompilationError: User: {}", message))
19+
}
20+
CompilationError::Unsupported(message, _) => f.write_fmt(format_args!(
21+
"SQLCompilationError: Unsupported: {}",
22+
message
23+
)),
24+
CompilationError::Fatal(message, _) => {
25+
f.write_fmt(format_args!("SQLCompilationError: Fatal: {}", message))
26+
}
1927
}
2028
}
2129
}

rust/cubesql/pg-srv/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ pub use encoding::*;
1616
pub use extended::*;
1717
pub use pg_type::*;
1818

19-
use std::backtrace::Backtrace;
20-
use std::fmt::Formatter;
19+
use std::{backtrace::Backtrace, fmt::Formatter};
2120

2221
/// Protocol error abstract of handled/unhandled errors, it should not handle any kind of business logic errors
2322
#[derive(Debug)]
@@ -36,7 +35,9 @@ impl std::fmt::Display for ProtocolError {
3635
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
3736
match self {
3837
ProtocolError::IO { source, .. } => f.write_fmt(format_args!("IO error: {}", source)),
39-
ProtocolError::ErrorResponse { source, .. } => f.write_fmt(format_args!("IO error: {}", source))
38+
ProtocolError::ErrorResponse { source, .. } => {
39+
f.write_fmt(format_args!("IO error: {}", source))
40+
}
4041
}
4142
}
4243
}

0 commit comments

Comments
 (0)