cargo fix + fmt
This commit is contained in:
parent
32f11494c2
commit
8724149a04
@ -35,8 +35,12 @@ impl PullRequest {
|
|||||||
&self.base.label
|
&self.base.label
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn number(&self) -> usize { self.number }
|
pub fn number(&self) -> usize {
|
||||||
pub fn title(&self) -> &str { &self.title }
|
self.number
|
||||||
|
}
|
||||||
|
pub fn title(&self) -> &str {
|
||||||
|
&self.title
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Debug)]
|
#[derive(Deserialize, Debug)]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
use petgraph::Graph;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use petgraph::Graph;
|
|
||||||
|
|
||||||
use crate::api::search::PullRequest;
|
use crate::api::search::PullRequest;
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::rc::Rc;
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::process;
|
use std::process;
|
||||||
|
use std::rc::Rc;
|
||||||
|
|
||||||
use gh_stack::api;
|
use gh_stack::api;
|
||||||
use gh_stack::graph;
|
use gh_stack::graph;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
use petgraph::{Direction,Graph};
|
|
||||||
use std::rc::Rc;
|
|
||||||
use petgraph::visit::Bfs;
|
use petgraph::visit::Bfs;
|
||||||
use petgraph::visit::EdgeRef;
|
use petgraph::visit::EdgeRef;
|
||||||
|
use petgraph::{Direction, Graph};
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
|
use std::rc::Rc;
|
||||||
|
|
||||||
use crate::api::search::PullRequest;
|
use crate::api::search::PullRequest;
|
||||||
|
|
||||||
@ -27,7 +27,12 @@ pub fn build_table(graph: Graph<Rc<PullRequest>, usize>) -> String {
|
|||||||
let node: Rc<PullRequest> = graph[node].clone();
|
let node: Rc<PullRequest> = graph[node].clone();
|
||||||
|
|
||||||
let row = match parent {
|
let row = match parent {
|
||||||
Some(parent) => format!("|#{}|{}|#{}|\n", node.number(), node.title(), graph[parent.source().clone()].number()),
|
Some(parent) => format!(
|
||||||
|
"|#{}|{}|#{}|\n",
|
||||||
|
node.number(),
|
||||||
|
node.title(),
|
||||||
|
graph[parent.source().clone()].number()
|
||||||
|
),
|
||||||
None => format!("|#{}|{}|**N/A**|\n", node.number(), node.title()),
|
None => format!("|#{}|{}|**N/A**|\n", node.number(), node.title()),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user