From 5760f9ba9c7d88ee75968b8c8e93171efae47014 Mon Sep 17 00:00:00 2001
From: konstin <konstin@mailbox.org>
Date: Fri, 14 Sep 2018 23:06:23 +0200
Subject: [PATCH] Fix windows compilation

---
 Changelog.md         | 9 ++++++++-
 src/module_writer.rs | 6 +++---
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/Changelog.md b/Changelog.md
index c8b260992..ad27e4778 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
+## [0.3.1] - 2017-09-14
+
+### Fixed
+
+ * Windows compilation
+ 
 ## [0.3.0] - 2017-09-14
 
 ### Added
@@ -38,7 +44,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
  * Initial Release
 
-[Unreleased]: https://github.com/pyo3/pyo3-pack/compare/v1.0.0...HEAD
+[Unreleased]: https://github.com/pyo3/pyo3-pack/compare/v0.3.1...HEAD
+[0.3.0]: https://github.com/pyo3/pyo3-pack/compare/v0.3.0...v0.3.1
 [0.3.0]: https://github.com/pyo3/pyo3-pack/compare/v0.2.0...v0.3.0
 [0.2.0]: https://github.com/pyo3/pyo3-pack/compare/v0.1.0...v0.2.0
 
diff --git a/src/module_writer.rs b/src/module_writer.rs
index 263a579dc..54ad3b262 100644
--- a/src/module_writer.rs
+++ b/src/module_writer.rs
@@ -92,7 +92,7 @@ impl ModuleWriter for DevelopModuleWriter {
         &mut self,
         target: impl AsRef<Path>,
         bytes: &[u8],
-        permissions: u32,
+        _permissions: u32,
     ) -> Result<(), io::Error> {
         let path = self.base_path.join(target);
 
@@ -103,12 +103,12 @@ impl ModuleWriter for DevelopModuleWriter {
                 fs::OpenOptions::new()
                     .create(true)
                     .write(true)
-                    .mode(permissions)
+                    .mode(_permissions)
                     .open(path)?
             }
             #[cfg(target_os = "windows")]
             {
-                File::create(x)?
+                File::create(path)?
             }
         };