Skip to content
Merged
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
8 changes: 7 additions & 1 deletion src/bindgen/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::path;

use crate::bindgen::bindings::Bindings;
use crate::bindgen::cargo::Cargo;
use crate::bindgen::config::{Braces, Config, Language, Profile, Style};
use crate::bindgen::config::{Braces, Config, Language, LineEndingStyle, Profile, Style};
use crate::bindgen::error::Error;
use crate::bindgen::library::Library;
use crate::bindgen::parser::{self, Parse};
Expand Down Expand Up @@ -343,6 +343,12 @@ impl Builder {
self
}

#[allow(unused)]
pub fn with_line_endings(mut self, line_ending_style: LineEndingStyle) -> Builder {
self.config.line_endings = line_ending_style;
self
}

pub fn generate(self) -> Result<Bindings, Error> {
// If macro expansion is enabled, then cbindgen will attempt to build the crate
// and will run its build script which may run cbindgen again. That second run may start
Expand Down