Skip to content

Commit e29888f

Browse files
re-format Rust backend source code with config in rustfmt.toml
1 parent 8617461 commit e29888f

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/back_end/src/utils/browser.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ pub enum OpenBrowserStatus {
1414
/// # Safety
1515
/// Be careful with raw pointers.
1616
#[unsafe(no_mangle)]
17-
pub unsafe extern "C" fn raw_open_browser(url: *const c_char) -> OpenBrowserStatus {
17+
pub unsafe extern "C" fn raw_open_browser(
18+
url: *const c_char,
19+
) -> OpenBrowserStatus {
1820
unsafe {
1921
use OpenBrowserStatus as Status;
2022

src/back_end/src/utils/fs_utils.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ pub enum CreateFileSystemStatus {
1919
/// Be careful with raw pointers.
2020
#[must_use]
2121
#[unsafe(no_mangle)]
22-
pub unsafe extern "C" fn raw_new_folder(folder_path: *const c_char) -> CreateFileSystemStatus {
22+
pub unsafe extern "C" fn raw_new_folder(
23+
folder_path: *const c_char,
24+
) -> CreateFileSystemStatus {
2325
unsafe {
2426
use CreateFileSystemStatus as Status;
2527
let (c_str, is_ok) = raw_from_ptr(folder_path);

src/back_end/src/utils/memory.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use std::ffi::{CStr, CString, c_char};
22

3-
pub(crate) const unsafe fn raw_from_ptr(url: *const c_char) -> (&'static str, bool) {
3+
pub(crate) const unsafe fn raw_from_ptr(
4+
url: *const c_char,
5+
) -> (&'static str, bool) {
46
unsafe {
57
let Ok(c_str) = CStr::from_ptr(url).to_str() else {
68
return ("", false);

0 commit comments

Comments
 (0)