Skip to content

Commit

Permalink
add backward compatible for Elixir < 1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
zookzook committed May 27, 2022
1 parent d1b5286 commit 0c1b5c4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ 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.9.1 (2022-05-27)
* Bugfix
* add backward compatible for Elixir < 1.13 (thanks to ja-jimenez)

## 0.9.0 (2022-05-21)
* Enhancements
* add colored log output
Expand Down
3 changes: 2 additions & 1 deletion lib/mongo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1824,7 +1824,8 @@ defmodule Mongo do
end

defp to_iodata(doc) do
opts = Inspect.Opts.new([])
default_inspect_fun = :persistent_term.get({Inspect.Opts, :inspect_fun}, &Inspect.inspect/2)
opts = %Inspect.Opts{inspect_fun: default_inspect_fun}

doc =
doc
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Mongodb.Mixfile do
use Mix.Project

@source_url "https://github.com/zookzook/elixir-mongodb-driver"
@version "0.9.0"
@version "0.9.1"

def project() do
[
Expand Down

0 comments on commit 0c1b5c4

Please sign in to comment.