Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dependabot/fetch-metadata from 1 to 2 #333

Merged
merged 3 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
Expand Down
8 changes: 4 additions & 4 deletions clash_lib/src/app/outbound/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,17 @@ impl OutboundManager {
}

pub fn get_outbound(&self, name: &str) -> Option<AnyOutboundHandler> {
self.handlers.get(name).map(Clone::clone)
self.handlers.get(name).cloned()
}

/// this doesn't populate history/liveness information
pub fn get_proxy_provider(&self, name: &str) -> Option<ThreadSafeProxyProvider> {
self.proxy_providers.get(name).map(Clone::clone)
self.proxy_providers.get(name).cloned()
}

// API handles start
pub fn get_selector_control(&self, name: &str) -> Option<ThreadSafeSelectorControl> {
self.selector_control.get(name).map(Clone::clone)
self.selector_control.get(name).cloned()
}

pub async fn get_proxies(&self) -> HashMap<String, Box<dyn Serialize + Send>> {
Expand Down Expand Up @@ -248,7 +248,7 @@ impl OutboundManager {
handlers
.get(x)
.ok_or_else(|| Error::InvalidConfig(format!("proxy {} not found", x)))
.map(Clone::clone)
.cloned()
})
.collect::<Result<Vec<_>, _>>()?;

Expand Down
4 changes: 2 additions & 2 deletions clash_lib/src/app/profile/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl ThreadSafeCacheFile {
pub async fn get_selected(&self, group: &str) -> Option<String> {
let g = self.0.read().await;
if g.store_selected() {
g.db.selected.get(group).map(Clone::clone)
g.db.selected.get(group).cloned()
} else {
None
}
Expand Down Expand Up @@ -155,7 +155,7 @@ impl CacheFile {
.ip_to_host
.get(ip_or_host)
.or_else(|| self.db.host_to_ip.get(ip_or_host))
.map(Clone::clone)
.cloned()
}

pub fn delete_fake_ip_pair(&mut self, ip: &str, host: &str) {
Expand Down
6 changes: 3 additions & 3 deletions clash_lib/src/proxy/converters/vmess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl TryFrom<&OutboundVmess> for AnyOutboundHandler {
port: s.port,
uuid: s.uuid.clone(),
alter_id: s.alter_id,
security: s.cipher.as_ref().map(Clone::clone).unwrap_or_default(),
security: s.cipher.clone().unwrap_or_default(),
udp: s.udp.unwrap_or(true),
transport: s
.network
Expand Down Expand Up @@ -102,9 +102,9 @@ impl TryFrom<&OutboundVmess> for AnyOutboundHandler {
s.ws_opts
.as_ref()
.and_then(|x| {
x.headers.as_ref().map(Clone::clone).and_then(|x| {
x.headers.clone().and_then(|x| {
let h = x.get("Host");
h.map(Clone::clone)
h.cloned()
})
})
.unwrap_or(s.server.to_owned())
Expand Down