Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust formatter #8

Merged
merged 5 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pod-operation/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
./target

10 changes: 10 additions & 0 deletions pod-operation/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "pod-operation",
"version": "1.0.0",
"description": "",
"scripts": {
"lint": "cargo clippy",
"format": "cargo fmt"
},
"author": ""
}
1 change: 1 addition & 0 deletions pod-operation/rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hard_tabs = true
16 changes: 8 additions & 8 deletions pod-operation/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ use socketioxide::SocketIo;

#[tokio::main]
async fn main() {
// Make a layer for Socket connection
let (layer, _io) = SocketIo::new_layer();
// Make a layer for Socket connection
let (layer, _io) = SocketIo::new_layer();

// Initialize the
let app: Router = Router::new()
.route("/", get(|| async { "Hello world" }))
.layer(layer);
// Initialize the
let app: Router = Router::new()
.route("/", get(|| async { "Hello world" }))
.layer(layer);

let listener = tokio::net::TcpListener::bind("0.0.0.0:5000").await.unwrap();
let listener = tokio::net::TcpListener::bind("0.0.0.0:5000").await.unwrap();

axum::serve(listener, app).await.unwrap();
axum::serve(listener, app).await.unwrap();
}