Skip to content
Merged

fix ci #3035

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/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ jobs:
runs-on: macos-latest
steps:
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
uses: Homebrew/actions/setup-homebrew@main

- name: Install stable Rust
uses: actions-rs/toolchain@v1
Expand Down
13 changes: 5 additions & 8 deletions asyncgit/src/sync/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::error::Result;
use git2::Repository;
use scopetime::scope_time;
use serde::{Deserialize, Serialize};
use std::str::FromStr;

use super::{repository::repo, RepoPath};

Expand Down Expand Up @@ -73,11 +74,9 @@ pub enum PushDefaultStrategyConfig {
Matching,
}

impl<'a> TryFrom<&'a str> for PushDefaultStrategyConfig {
type Error = crate::Error;
fn try_from(
value: &'a str,
) -> std::result::Result<Self, Self::Error> {
impl FromStr for PushDefaultStrategyConfig {
type Err = crate::Error;
fn from_str(value: &str) -> std::result::Result<Self, Self::Err> {
match value {
"nothing" => Ok(Self::Nothing),
"current" => Ok(Self::Current),
Expand All @@ -96,9 +95,7 @@ pub fn push_default_strategy_config_repo(
) -> Result<PushDefaultStrategyConfig> {
(get_config_string_repo(repo, "push.default")?).map_or_else(
|| Ok(PushDefaultStrategyConfig::default()),
|entry_str| {
PushDefaultStrategyConfig::try_from(entry_str.as_str())
},
|entry_str| entry_str.parse(),
)
}

Expand Down
6 changes: 3 additions & 3 deletions src/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ use std::{
bitflags! {
/// flags defining what part of the app need to update
pub struct NeedsUpdate: u32 {
/// app::update
/// `app::update`
const ALL = 0b001;
/// diff may have changed (app::update_diff)
/// diff may have changed (`app::update_diff`)
const DIFF = 0b010;
/// commands might need updating (app::update_commands)
/// commands might need updating (`app::update_commands`)
const COMMANDS = 0b100;
/// branches have changed
const BRANCHES = 0b1000;
Expand Down
Loading