Skip to content

Commit

Permalink
Rust formatter (#8)
Browse files Browse the repository at this point in the history
* Added formatter and lint checker for rust

* Added gitignore

* Fixed merge conflicts
  • Loading branch information
vrushang1234 authored Nov 21, 2024
1 parent 2168a7f commit ee18a89
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
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();
}

0 comments on commit ee18a89

Please sign in to comment.