feat: Add utility to convert OsStr to CString (#136)

* Add utility to convert OsStr to CString

This is approach seems acceptable in the context of deltachat, it
should work correctly on unix and on Windows requires paths to be
valid utf-8.

* Use failure crate for error types

* Add OsStrExt impl for Path, fix windows and update docs

- Adds an OsStrExt impl for Path directly, a little more convenience.

- Fix the windows code to actually use the right function name.  Test
  the impl function on unix too since that was the point of having it
  implemented in a separate function to begin with.

- Improve the docs, do hyperlinks a bit better.

* Another attempt at learing to type

Having your compiler in the cloud is just painful.

* Do not treat this as a fatal error

When PRs are made from forks the passwords are unavailable.  We don't
want CI to fail because of this.

* Implement using the AsRef<OsStr> trait

This means any type with implements this trait will get this
implementation, thus covering both OsStr and Path instead of having
duplicate implementations for those like before.

* fix format
This commit is contained in:
Lars-Magnus Skog
2019-06-08 03:04:30 +02:00
committed by GitHub
parent 02e7dc022b
commit a32a275d73
4 changed files with 173 additions and 1 deletions

View File

@@ -2,7 +2,7 @@
if [ -z "$DEVPI_LOGIN" ] ; then
echo "required: password for 'dc' user on https://m.devpi/net/dc index"
exit 1
exit 0
fi
set -xe