Skip to content

Commit

Permalink
chore(#13): some light fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
l3r8yJ committed Jun 22, 2024
1 parent 5baeb45 commit 496125b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clippy.toml → .clippy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# SOFTWARE.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ members = [
"server",
"cli",
]

resolver = "1"
5 changes: 4 additions & 1 deletion server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
use std::io;

use axum::routing::get;
use axum::Router;
use tokio::net::TcpListener;
Expand All @@ -45,7 +47,7 @@ impl Server {
touch_storage(Some("fakehub.xml"));
let app: Router = Router::new().route("/", get(home::home));
let addr: String = format!("0.0.0.0:{}", self.port);
let started: std::io::Result<TcpListener> = TcpListener::bind(addr.clone()).await;
let started: io::Result<TcpListener> = TcpListener::bind(addr.clone()).await;
match started {
Ok(listener) => axum::serve(listener, app).await?,
Err(err) => {
Expand All @@ -56,6 +58,7 @@ impl Server {
}
}

#[cfg(test)]
mod tests {

#[test]
Expand Down

0 comments on commit 496125b

Please sign in to comment.