mirror of https://github.com/stelzo/typst.git
fixed warinings
This commit is contained in:
parent
3436f825f2
commit
0a1df1ee67
|
|
@ -1,24 +1,16 @@
|
|||
use std::cell::{RefCell, RefMut};
|
||||
use std::collections::VecDeque;
|
||||
use std::fmt::Debug;
|
||||
use std::fs;
|
||||
use std::io::{self, ErrorKind, Read};
|
||||
use std::ops::Deref;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::Arc;
|
||||
use std::time::{Duration, Instant};
|
||||
use std::path::Path;
|
||||
use std::time::Instant;
|
||||
use auth_git2::GitAuthenticator;
|
||||
use crate::package_downloads::{
|
||||
DownloadState, PackageDownloader, Progress, DEFAULT_NAMESPACE,
|
||||
DownloadState, PackageDownloader, Progress,
|
||||
};
|
||||
use ecow::{eco_format, EcoString};
|
||||
use native_tls::{Certificate, TlsConnector};
|
||||
use once_cell::sync::OnceCell;
|
||||
use typst_library::diag::{bail, PackageError, PackageResult};
|
||||
use typst_library::diag::{PackageError, PackageResult};
|
||||
use typst_syntax::package::{PackageInfo, PackageSpec, VersionlessPackageSpec};
|
||||
use git2::{AutotagOption, FetchOptions, Progress as GitProgress, RemoteCallbacks};
|
||||
use git2::build::{CheckoutBuilder, RepoBuilder};
|
||||
use typst_library::html::tag::form;
|
||||
use git2::{FetchOptions, RemoteCallbacks};
|
||||
use git2::build::RepoBuilder;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct GitDownloader;
|
||||
|
|
@ -97,11 +89,9 @@ impl GitDownloader {
|
|||
impl PackageDownloader for GitDownloader {
|
||||
fn download_index(
|
||||
&self,
|
||||
spec: &VersionlessPackageSpec,
|
||||
_spec: &VersionlessPackageSpec,
|
||||
) -> Result<Vec<PackageInfo>, EcoString> {
|
||||
|
||||
//todo ls-remote
|
||||
todo!()
|
||||
Err(eco_format!("Downloading index is not supported for git repositories"))
|
||||
}
|
||||
|
||||
fn download(
|
||||
|
|
|
|||
|
|
@ -63,15 +63,6 @@ impl HttpDownloader {
|
|||
}
|
||||
}
|
||||
|
||||
/// Crates a new downloader with the given user agent and certificate.
|
||||
pub fn with_cert(user_agent: impl Into<EcoString>, cert: Certificate) -> Self {
|
||||
Self {
|
||||
user_agent: user_agent.into(),
|
||||
cert_path: None,
|
||||
cert: OnceCell::with_value(cert),
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the certificate this client is using, if a custom certificate
|
||||
/// is used it is loaded on first access.
|
||||
///
|
||||
|
|
|
|||
Loading…
Reference in New Issue