Merge pull request #2439 from gitbutlerapp/fix-docs

fix doc references and test docs in CI
This commit is contained in:
Qix 2024-01-25 19:59:02 +01:00 committed by GitHub
commit 601bbfa09d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 27 additions and 9 deletions

View File

@ -79,6 +79,21 @@ jobs:
- run: cargo fmt --check --all
- run: cargo build --locked --all-targets --tests
rust-docs:
needs: changes
if: ${{ needs.changes.outputs.rust == 'true' }}
runs-on: ubuntu-latest
container:
image: ghcr.io/gitbutlerapp/ci-base-image:latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/init-env-rust
# TODO(qix-): we have to exclude the app here for now because for some
# TODO(qix-): reason it doesn't build with the docs feature enabled.
- run: cargo doc --no-deps --all-features --document-private-items -p gitbutler-core -p gitbutler-git -p gitbutler-diff
env:
RUSTDOCFLAGS: -Dwarnings
check-gitbutler-app:
needs: [changes, rust-init]
if: ${{ needs.changes.outputs.gitbutler-app == 'true' }}

View File

@ -6,9 +6,9 @@
//!
//! Related issues:
//!
//! - https://github.com/serde-rs/serde/issues/2120
//! - https://github.com/serde-rs/serde/issues/1937
//! - https://github.com/serde-rs/serde/issues/1272
//! - <https://github.com/serde-rs/serde/issues/2120>
//! - <https://github.com/serde-rs/serde/issues/1937>
//! - <https://github.com/serde-rs/serde/issues/1272>
//!
//! If/when those are fixed, we should be able to (trivially) add `serde` support.
//! Otherwise, neither the length prefix imposed by `(de)serialize_bytes()` nor the

View File

@ -5,7 +5,12 @@
mod executor;
mod repository;
pub use self::{executor::GitExecutor, repository::Repository};
#[cfg(unix)]
pub use self::executor::Uid;
pub use self::{
executor::{AskpassServer, FileStat, GitExecutor, Pid, Socket},
repository::Repository,
};
#[cfg(feature = "tokio")]
pub use self::executor::tokio;

View File

@ -1,4 +1,4 @@
//! A [Tokio](https://tokio.rs)-based [`GitExecutor`] implementation.
//! A [Tokio](https://tokio.rs)-based [`super::GitExecutor`] implementation.
use crate::prelude::*;
use core::time::Duration;
@ -7,7 +7,7 @@ use std::os::unix::fs::MetadataExt;
use std::{fs::Permissions, os::unix::fs::PermissionsExt};
use tokio::process::Command;
/// A [`GitExecutor`] implementation using the `git` command-line tool
/// A [`super::GitExecutor`] implementation using the `git` command-line tool
/// via [`tokio::process::Command`].
pub struct TokioExecutor;
@ -95,7 +95,7 @@ impl super::Socket for tokio::io::BufStream<tokio::net::UnixStream> {
}
}
/// A tokio-based [`AskpassServer`] implementation.
/// A tokio-based [`super::AskpassServer`] implementation.
#[cfg(unix)]
pub struct TokioAskpassServer {
// Always Some until dropped.

View File

@ -23,7 +23,6 @@
//!
//! This hampers certain use cases, such as implementing
//! [`cli::GitExecutor`] for e.g. remote connections.
#![cfg_attr(not(feature = "std"), no_std)] // must be first
#![feature(error_in_core)]
#![deny(missing_docs, unsafe_code)]

View File

@ -81,7 +81,6 @@ pub enum Authorization {
password: String,
},
/// Specifies a set of credentials for logging in with SSH.
/// If
Ssh {
/// The path to the SSH private key to use for authentication.
/// If `None`, the default SSH key will be used (i.e. `-i` will not