mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Remove some unused pub
functions (#3872)
## Summary I wrote a bad Python script to find these.
This commit is contained in:
parent
1fc6a59707
commit
cedd18e4c6
12 changed files with 3 additions and 174 deletions
|
@ -43,12 +43,6 @@ impl BaseUrl {
|
|||
pub fn as_url(&self) -> &Url {
|
||||
&self.0
|
||||
}
|
||||
|
||||
/// Convert to the underlying [`Url`].
|
||||
#[must_use]
|
||||
pub fn into_url(self) -> Url {
|
||||
self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Url> for BaseUrl {
|
||||
|
|
|
@ -5,7 +5,7 @@ use thiserror::Error;
|
|||
use url::{ParseError, Url};
|
||||
|
||||
use pep508_rs::{Pep508Url, UnnamedRequirementUrl, VerbatimUrl, VerbatimUrlError};
|
||||
use uv_git::{GitSha, GitUrl};
|
||||
use uv_git::GitUrl;
|
||||
|
||||
use crate::{ArchiveInfo, DirInfo, DirectUrl, VcsInfo, VcsKind};
|
||||
|
||||
|
@ -240,12 +240,6 @@ fn get_subdirectory(url: &Url) -> Option<PathBuf> {
|
|||
Some(PathBuf::from(subdirectory))
|
||||
}
|
||||
|
||||
/// Return the Git reference of the given URL, if it exists.
|
||||
pub fn git_reference(url: Url) -> Result<Option<GitSha>, Box<ParsedUrlError>> {
|
||||
let ParsedGitUrl { url, .. } = ParsedGitUrl::try_from(url)?;
|
||||
Ok(url.precise())
|
||||
}
|
||||
|
||||
impl TryFrom<Url> for ParsedUrl {
|
||||
type Error = ParsedUrlError;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue