Skip to content

Commit 9a23470

Browse files
authored
Add missing Debug traits (#1088)
1 parent 7ced6d7 commit 9a23470

File tree

17 files changed

+21
-6
lines changed

17 files changed

+21
-6
lines changed

enums/src/go.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::path::Path;
66
use crate::common::*;
77
use crate::languages::*;
88

9-
#[derive(Template)]
9+
#[derive(Debug, Template)]
1010
#[template(path = "go.go", escape = "none")]
1111
struct GoTemplate {
1212
c_name: String,

enums/src/json.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::path::Path;
66
use crate::common::*;
77
use crate::languages::*;
88

9-
#[derive(Template)]
9+
#[derive(Debug, Template)]
1010
#[template(path = "json.json", escape = "none")]
1111
struct JsonTemplate {
1212
names: Vec<(String, bool, String)>,

enums/src/rust.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::languages::*;
99

1010
const MACROS_DEFINITION_DIR: &str = "data";
1111

12-
#[derive(Template)]
12+
#[derive(Debug, Template)]
1313
#[template(path = "rust.rs", escape = "none")]
1414
struct RustTemplate {
1515
c_name: String,
@@ -36,7 +36,7 @@ pub fn generate_rust(output: &Path, file_template: &str) -> std::io::Result<()>
3636
Ok(())
3737
}
3838

39-
#[derive(Template)]
39+
#[derive(Debug, Template)]
4040
#[template(path = "c_macros.rs", escape = "none")]
4141
struct CMacrosTemplate {
4242
u_name: String,

rust-code-analysis-web/src/web/comment.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ pub struct WebCommentInfo {
3232
}
3333

3434
/// Server request configuration.
35+
#[derive(Debug)]
3536
pub struct WebCommentCfg {
3637
/// Request identifier.
3738
pub id: String,
3839
}
3940

4041
/// Unit structure to implement the `Callback` trait.
42+
#[derive(Debug)]
4143
pub struct WebCommentCallback;
4244

4345
impl Callback for WebCommentCallback {

rust-code-analysis-web/src/web/function.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ pub struct WebFunctionInfo {
3131
}
3232

3333
/// Server request configuration.
34+
#[derive(Debug)]
3435
pub struct WebFunctionCfg {
3536
/// Request identifier.
3637
pub id: String,

rust-code-analysis-web/src/web/metrics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ pub struct WebMetricsInfo {
4444
}
4545

4646
/// Server request configuration.
47+
#[derive(Debug)]
4748
pub struct WebMetricsCfg {
4849
/// Request identifier.
4950
pub id: String,

src/ast.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ pub struct AstCallback {
128128
}
129129

130130
/// Configuration options for retrieving the nodes of an `AST`.
131+
#[derive(Debug)]
131132
pub struct AstCfg {
132133
/// The id associated to a request for an `AST`
133134
pub id: String,

src/comment_rm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ fn remove_from_code(code: &[u8], mut spans: Vec<(usize, usize, usize)>) -> Vec<u
6262
}
6363

6464
/// Configuration options for removing comments from a code.
65+
#[derive(Debug)]
6566
pub struct CommentRmCfg {
6667
/// If `true`, the modified code is saved on a file
6768
pub in_place: bool,

src/concurrent_files.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ type ProcPathFunction<Config> = dyn Fn(&Path, &Config) + Send + Sync;
1818
fn null_proc_dir_paths<Config>(_: &mut HashMap<String, Vec<PathBuf>>, _: &Path, _: &Config) {}
1919
fn null_proc_path<Config>(_: &Path, _: &Config) {}
2020

21+
#[derive(Debug)]
2122
struct JobItem<Config> {
2223
path: PathBuf,
2324
cfg: Arc<Config>,
@@ -141,6 +142,7 @@ pub enum ConcurrentErrors {
141142
}
142143

143144
/// Data related to files.
145+
#[derive(Debug)]
144146
pub struct FilesData {
145147
/// Kind of files included in a search.
146148
pub include: GlobSet,

src/count.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ pub fn count<T: ParserTrait>(parser: &T, filters: &[String]) -> (usize, usize) {
3838

3939
/// Configuration options for counting different
4040
/// types of nodes in a code.
41+
#[derive(Debug)]
4142
pub struct CountCfg {
4243
/// Types of nodes to count
4344
pub filters: Vec<String>,

0 commit comments

Comments
 (0)