Remove some unused pub functions (#3872)

## Summary

I wrote a bad Python script to find these.
This commit is contained in:
Charlie Marsh 2024-05-28 11:58:13 -04:00 committed by GitHub
parent 1fc6a59707
commit cedd18e4c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 3 additions and 174 deletions

View file

@ -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 {

View file

@ -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;