Rename using => using_namespaces

This commit is contained in:
Rasmus Eneman
2019-08-25 18:16:10 +02:00
committed by Emilio Cobos Álvarez
parent 4bd7b07d2f
commit f1433bd3b9
12 changed files with 11 additions and 6 deletions
+2 -2
View File
@@ -217,8 +217,8 @@ impl Bindings {
}
if self.config.language == Language::Cxx || self.config.cpp_compat {
if let Some(ref using) = self.config.using {
for namespace in using {
if let Some(ref using_namespaces) = self.config.using_namespaces {
for namespace in using_namespaces {
out.new_line();
write!(out, "using namespace {};", namespace);
}
+3 -3
View File
@@ -621,8 +621,8 @@ pub struct Config {
pub namespace: Option<String>,
/// An optional list of namespaces. Only applicable when language="C++"
pub namespaces: Option<Vec<String>>,
/// An optional list of namespaces to ddeclare as using. Only applicable when language="C++"
pub using: Option<Vec<String>>,
/// An optional list of namespaces to declare as using. Only applicable when language="C++"
pub using_namespaces: Option<Vec<String>>,
/// The style to use for braces
pub braces: Braces,
/// The preferred length of a line, used for auto breaking function arguments
@@ -674,7 +674,7 @@ impl Default for Config {
no_includes: false,
namespace: None,
namespaces: None,
using: None,
using_namespaces: None,
braces: Braces::SameLine,
line_length: 100,
tab_width: 2,
@@ -3,6 +3,8 @@
#include <cstdlib>
#include <new>
namespace root {
using namespace std;
extern "C" {
@@ -10,3 +12,5 @@ extern "C" {
void root();
} // extern "C"
} // namespace root
-1
View File
@@ -1 +0,0 @@
using = ["std"]
+2
View File
@@ -0,0 +1,2 @@
namespaces = ["root"]
using_namespaces = ["std"]