mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-06 19:45:23 +00:00
docs and linting
This commit is contained in:
parent
ef4154cb4b
commit
dff80355d4
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@ -56,12 +56,20 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@nightly
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Check documentation
|
||||
env:
|
||||
RUSTDOCFLAGS: -D warnings
|
||||
run: cargo doc --no-deps --document-private-items --all-features --workspace --examples
|
||||
- name: Configure cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
- name: Setup pages
|
||||
id: pages
|
||||
uses: actions/configure-pages@v4
|
||||
- name: Clean docs folder
|
||||
run: cargo clean --doc
|
||||
- name: Build docs
|
||||
run: cargo doc --no-deps
|
||||
- name: Add redirect
|
||||
run: echo '<meta http-equiv="refresh" content="0;url=tv/index.html">' > target/doc/index.html
|
||||
- name: Remove lock file
|
||||
run: rm target/doc/.lock
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v2
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: "target/docs"
|
||||
path: target/doc
|
||||
|
@ -87,6 +87,12 @@ pub struct Previewer {
|
||||
env_var: EnvVarPreviewer,
|
||||
}
|
||||
|
||||
impl Default for Previewer {
|
||||
fn default() -> Self {
|
||||
Previewer::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Previewer {
|
||||
pub fn new() -> Self {
|
||||
Previewer {
|
||||
|
@ -5,6 +5,12 @@ use crate::previewers::{Preview, PreviewContent};
|
||||
|
||||
pub struct BasicPreviewer {}
|
||||
|
||||
impl Default for BasicPreviewer {
|
||||
fn default() -> Self {
|
||||
BasicPreviewer::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl BasicPreviewer {
|
||||
pub fn new() -> Self {
|
||||
BasicPreviewer {}
|
||||
|
@ -15,6 +15,12 @@ pub struct DirectoryPreviewer {
|
||||
cache: Arc<Mutex<PreviewCache>>,
|
||||
}
|
||||
|
||||
impl Default for DirectoryPreviewer {
|
||||
fn default() -> Self {
|
||||
DirectoryPreviewer::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl DirectoryPreviewer {
|
||||
pub fn new() -> Self {
|
||||
DirectoryPreviewer {
|
||||
|
@ -8,6 +8,12 @@ pub struct EnvVarPreviewer {
|
||||
cache: HashMap<entry::Entry, Arc<Preview>>,
|
||||
}
|
||||
|
||||
impl Default for EnvVarPreviewer {
|
||||
fn default() -> Self {
|
||||
EnvVarPreviewer::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl EnvVarPreviewer {
|
||||
pub fn new() -> Self {
|
||||
EnvVarPreviewer {
|
||||
|
@ -31,6 +31,12 @@ pub struct FilePreviewer {
|
||||
//image_picker: Arc<Mutex<Picker>>,
|
||||
}
|
||||
|
||||
impl Default for FilePreviewer {
|
||||
fn default() -> Self {
|
||||
FilePreviewer::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl FilePreviewer {
|
||||
pub fn new() -> Self {
|
||||
let syntax_set = SyntaxSet::load_defaults_nonewlines();
|
||||
|
Loading…
x
Reference in New Issue
Block a user