This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //! The default [`Result::into_iter()`] produces an iterator which yields `None` | |
| //! on `Err`, effectively ignoring/discarding errors. For example: | |
| //! | |
| //! ``` | |
| //! let v: Vec<Result<Vec<Result<i32,i32>>,i32>> = vec![ | |
| //! Ok(vec![Ok(1), Ok(2), Err(3)]), | |
| //! Err(4), | |
| //! Ok(vec![Ok(5), Ok(6)]), | |
| //! ]; | |
| //! let v: Vec<Result<i32, i32>> = v.into_iter().flatten().flatten().collect(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Simplified script for using Dreamhost as a dynamic DNS provider. | |
| # Works on openwrt, but must have ssl support. | |
| # You will probably need to install libustream-openssl and ca-certificates. | |
| # You may need to edit IP detection lines for your specific configuration. | |
| # You could use cron to schedule it to run hourly: | |
| # crontab -e | |
| # 0 * * * * /root/dreamhost.sh | |
| # Don't forget to enable cron! |
NewerOlder