Skip to content

Commit

Permalink
fix: ci error
Browse files Browse the repository at this point in the history
  • Loading branch information
francis-du committed Jan 15, 2021
1 parent af51654 commit 3e1b076
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/cargo_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ jobs:
- build: stable
os: ubuntu-latest
rust: stable
- build: beta
os: ubuntu-latest
rust: beta
- build: nightly
os: ubuntu-latest
rust: nightly
Expand All @@ -28,21 +25,15 @@ jobs:
- build: windows
os: windows-latest
rust: stable
- build: msrv
os: ubuntu-latest
rust: 1.39.0
steps:
- uses: actions/checkout@master
- name: Install Rust
run: |
rustup set profile minimal
rustup component remove --toolchain=${{ matrix.rust }} rust-docs || echo "already removed"
rustup update --no-self-update ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup -V
rustc -Vv
cargo -V
- name: Build and run tests
run: cargo test
- name: Test no default
run: cargo test --no-default-features
run: cargo test
2 changes: 1 addition & 1 deletion docs/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ authors = ["francis-du"]
language = "en"
multilingual = false
src = "src"
title = "y"
title = "Wiki Graph Docs"
4 changes: 2 additions & 2 deletions src/api.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use log::info;
use tide::{Response, StatusCode};
use tide::http::mime;
use tide::{Response, StatusCode};

use crate::handler::get_handle;

Expand Down Expand Up @@ -47,7 +47,7 @@ impl API {
let response = Response::builder(StatusCode::Ok)
.body(
"<div>Wiki Graph api docs link: \
<a href=\"https://wiki-graph.fracnis.run\"> \
<a href=\"https://wiki-graph.francis.run/\"> \
https://wiki-graph.fracnis.run</a></div>",
)
.content_type(mime::HTML)
Expand Down
4 changes: 2 additions & 2 deletions src/handler/get_handle.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use log::{error, info};
use rand::{Rng, thread_rng};
use rand::{thread_rng, Rng};
use serde::{Deserialize, Serialize};
use tide::Request;
use whatlang::{detect, Lang};
Expand Down Expand Up @@ -80,7 +80,7 @@ pub async fn search(req: Request<()>) -> tide::Result {

let id = match page.get_pageid().unwrap().parse::<u32>() {
Ok(i) => i,
Err(_) => thread_rng().gen()
Err(_) => thread_rng().gen(),
};

let mut children =
Expand Down

0 comments on commit 3e1b076

Please sign in to comment.